php-general | 2001032

[PHP] Re: [PHP-DB] Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded From: Terry Romine (eatrom <email protected>)
Date: 03/29/01

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>