php-general | 2001032
Date: 03/29/01
- Next message: Sebastian Bergmann: "[PHP] PHP Wordfile for UltraEdit"
- Previous message: Brandon Orther: "[PHP] Giving my script the power!"
- In reply to: Nick Davies: "Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Next in thread: Boget, Chris: "RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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>
- Next message: Sebastian Bergmann: "[PHP] PHP Wordfile for UltraEdit"
- Previous message: Brandon Orther: "[PHP] Giving my script the power!"
- In reply to: Nick Davies: "Re: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Next in thread: Boget, Chris: "RE: [PHP] RE: [PHP-DB] Best way to check if a query succeeded"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

