If you're unsure what the issue is, echo the mysql_error() when it fails.
<?php
$result = mysql_fetch_array($query_result) or die(mysql_error());
?>
That will certainly give you a clue as to what the problem is. If the error is "not a valid resource" then there's usually something wrong with your query (period instead of a comma between column names, misspelled table or column name, etc.).
bradgrafelman;10966630 wrote:Finally, if you still aren't seeing the results you're expecting, try echo'ing out the SQL query and make sure it is what you think it is.
This x100. I usually do this before actually putting in the mysql_query() function, especially if it's a long or complicated query, or if it's changing data (deleting, updating, etc.).