I'm a complete rookie at this, but I have a software package installed on a website and I want to do some minor customization. I've reviewed the faq's and other information regarding this software, and visited its support forum, but I haven't found what I need yet and the folks on the support forum aren't particularly helpful (or friendly).
This seems like a pretty easy thing to do, but I am a complete rookie with SQL and not much better with PHP. Everyone here on WMF has been great about offering assistance, so I figured I'd pitch my question here.
So here's my question (and forgive me if my terminology is wrong... there's not much in the way of comments or documentation with this software):
I have a fiction archive that uses an SQL database to store all the information about the archive (from member information to archive site settings to story information and on and on). There are 25 records(?) in this database - what I want to do involves two of them, a list of the ratings (similar to movie ratings) and the story data (author, summary, rating, etc.).
The record(?) of the ratings contains 6 strings, like (and I'll continue with the movie example for clarity) "G", "PG", "PG-13", "NC-17", "R" and "X". From examining the database through my site control program, I can see that the first string has an index of 1, up to 6 for the last one.
Now, in the other record(?), the one with all the 'header' information for each archived story, there is a field(?) which represents the rating, which appears to be stored as type varchar(25).
There is an existing file in this sofware package that outputs the story's title, author, and rating, all of which are found in the record(?) for the archived story. The catch is, the rating appears as a number, rather than the corresponding string. All I want to do is retrieve the string representation of the rating (I'm assuming it can be read into an array), and then output that string in place of the numeric representation (figuring I can use the value of the rating number as an index for the array).
To me this sounds simple, but I've read a couple of SQL and PHP tutorials and although I grasp the basics of how the database works, I could never quite understand how you get SQL data into a PHP variable.
Any assistance will be hugely appreciated!
Thanks!
R/L



