I have something like this
$query = "SELECT * FROM $tblname ORDER BY 'id' DESC"; $result = mysql_query($query);
but it doesnt seem to work.. any suggestions?
Try it without the '' thingy's
$query = "SELECT * FROM $tblname ORDER BY id DESC";
Nick
nope... didnt work.
sigh
try
echo mysql_error();
after you execute the query.
no mysql error is generated. I have already tried that. I take it that means the syntax is correct, and the query is valid. What else could be wrong?
try setting $tblname to '$tblname'
You can try running the explain command on a mysql prompt like this:
"EXPLAIN SELECT * FROM table ORDER BY id DESC"
this will show you some information on how mysql runs the query.