> Then you can use:
> if (mysql_num_rows($result) == 0) {
> stuff here
> }
> This will check the number of rows returned from your query. If zero,
> then do something....modify as you need.
What I generally do is this:
if(( !$result ) || ( mysql_errno() > 0 )) {
// error code here
}
OR
if(( $result ) && ( mysql_errno() == 0 )) {
// it's all good
}
If you want to use the above, precede the mysql_num_rows() function
call with the "@" symbol. If, for whatever reason, there was an error
or if there was a NULL result, you will get an error on the page saying
that it is an invalid result ID.
Chris