A good way to check if the result set is empty is to do put all statements 
that work on the result set in an if-statement with the following condition:

if (mysql_numrows($result) != 0)
         ... code here ...

Hope this helps


At 14:54 21/08/2001 +0100, Seb Frost wrote:
>Basically I want to check to see if $fileDir is already in my database.  I
>do this as:
>                 $result = mysql_query("SELECT fileDir FROM shoots WHERE
>How do I check the result?  I normally use
>                 mysql_result($result, $row, $field)
>to read my result, but if I try that I get an error:
>                 if(mysql_result($result, $row, $field))
>gives me:
>                 Warning: Unable to jump to row 0 on MySQL result index 3
>- seb
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to