Re: mysql upate return false?

From: Date: Thu, 22 Aug 2002 14:59:56 +0000
Subject: Re: mysql upate return false?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113626@lists.php.net to get a copy of this message
Is this a proper way to see if an insert has failed? $Query="insert blah into blah where blah=blah"; if (! mysql_query($Query,$link)) { $dberror= mysql_error() } Is there a better way to do it? Randy ----- Original Message ----- From: "Rasmus Lerdorf" <rasmus@php.net> To: "Randy Johnson" <icgphp@icecoldgold.com> Cc: "Rodrigo Peres" <rperes@mac.com>; "PHP" <php-general@lists.php.net> Sent: Thursday, August 22, 2002 10:52 AM Subject: Re: [PHP] mysql upate return false? > mysql_affected_rows() > > On Thu, 22 Aug 2002, Randy Johnson wrote: > > > I have a function > > > > > > update_trans(); > > > > > > in a mysql_query() that processes an update, what could i check for to see > > if it was successful or not. The update only updates 1 row. > > > > Thanks > > > > Randy > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#113626) next »