Re: [PHP] Detecting empty query result?

2001-08-21 Thread * RzE:
On Tue, Aug 21, 2001 at 02:54:33PM +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 (fileDir='$fileDir')); How do I check the result? I normally use

Re: [PHP] Detecting empty query result?

2001-08-21 Thread DevilKin
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 DevilKin At 14:54 21/08/2001 +0100, Seb Frost wrote:

RE: [PHP] Detecting empty query result?

2001-08-21 Thread Seb Frost
just use mysql_num_rows($result) dummy :-) doh. sorry to bother y'all. -Original Message- From: Seb Frost [mailto:[EMAIL PROTECTED]] Sent: 21 August 2001 14:55 To: [EMAIL PROTECTED] Subject: [PHP] Detecting empty query result? Basically I want to check to see if $fileDir is already