I'm trying to help someone put together a vocabulary database. However, when the pages comes up, we want the words to be in alphabetical order, regardless of how they were put in. Here's the code I'm using:
// show vocab list
$result = mysql_query("SELECT * FROM kvocab ORDER BY 'word' WHERE id=$id");
if ($myrow = mysql_fetch_array($result)) {
// display list if there are records to display
do {
printf("%s<p>\n", $myrow["word"]);
printf("%s<p>\n", $myrow["definition"]);
} while ($myrow = mysql_fetch_array($result));
When I try this it says 'not a valid resource result on line 73', which would be > if ($myrow = mysql_fetch_array($result)) <
Yes, that is the correct table name. I corrected it the first time hoping that was the prob, but the error was still present. Thanks in advance for your help. Have a nice day!