I do the same and I think this is the only way

Bartek Pawlik


----- Original Message -----
From: Jordan Elver <[EMAIL PROTECTED]>
To: PHP Database Mailing List <[EMAIL PROTECTED]>; PHP General Mailing
List <[EMAIL PROTECTED]>
Sent: Thursday, March 29, 2001 1:00 PM
Subject: [PHP-DB] Best way to check if a query succeeded


> Hi,
> i was just wondering what you guys do to check if a wquery suceeded or
not?
> I know about mysql_num_rows() and mysql_affected_rows(), just wondered
what
> you guys do?
>
> I normally do something like:
>
> $sql = "SELECT something FROM table";
> $result = mysql_query($sql);
> if(@mysql_num_rows($result) > 0) {
> echo'Query Suceeded';
> } else {
> echo'Query failed';
> }
>
> Cheers,
>
> Jord
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to