RE: [PHP] test for empty $result??

2001-09-10 Thread Jeff Lewis
Just use: if (!$result){ code here } Jeff -Original Message- From: Andrew [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 1:34 PM To: [EMAIL PROTECTED] Subject: [PHP] test for empty $result?? I know that this has been discussed before, but I cannot find the

RE: [PHP] test for empty $result??

2001-09-10 Thread Sam Masiello
] -Original Message- From: Andrew [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 1:45 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] test for empty $result?? thansk, but $result here is a Resource ID, and will be present even if the result set associated

RE: [PHP] test for empty $result??

2001-09-10 Thread Andrew
cool! thanks Sam and Jeff, for your responses! best, a -Original Message- From: Sam Masiello [mailto:[EMAIL PROTECTED]] Sent: Monday, September 10, 2001 1:48 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] test for empty $result?? Then you can use

RE: [PHP] test for empty $result??

2001-09-10 Thread Boget, Chris
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 somethingmodify as you need. What I generally do is this: if(( !$result ) || ( mysql_errno() 0 )) { // error code here } OR if((