Ben, I would say that the only reason
$select_sql_two = mysql_query($select_sql);

if($select_sql_two) {

would refuse to execute is if $select_sql represents an invalid SQL statement. Whether it has records or not, you should (if I'm not very much mistaken) get a resource returned in select_sql_two, which will make your IF succeed.

You should probably check out for more information on this function. The difference between "empty result" and "invalid query" is significant. Once you've determined that the query is valid, you must also then check to see if it returned any rows, possibly using a function like mysql_num_rows.

Hope that helps!

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to