Re: Re: RE: [PHP-DB] Best way to check if a query succeeded
| From: | Terry Romine | Date: | Thu, 29 Mar 2001 16:54:13 +0000 |
| Subject: | Re: Re: RE: [PHP-DB] Best way to check if a query succeeded | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-46116@lists.php.net to get a copy of this message | ||
On Thursday, March 29, 2001, at 08:32 AM, Nick Davies wrote:
Doesn't the command return 1 or 0 in success or failure? You may not have a result Probably wrong but something like if (mysql_query($query)) { } else { }What I understand is that the return from the query only tells you if the syntax is correct. NOT whether there were any records returned. That is what the mysql_num_rows gets you-- the number of records returned. Terry