Re: If a query fails?

From: Date: Sat, 10 May 2003 01:23:13 +0000
Subject: Re: If a query fails?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147084@lists.php.net to get a copy of this message
Chris, Takes guts to ask a question like this. Go directly to the MySQL portion of the most excellent PHP manual and read the section on mysql_affected_rows() and mysql_num_rows() and you'll .. a) know when updates/inserts succeeded b) know how to check for success on the return of data from a SELECT Cheers - Miles Thompson At 07:45 PM 5/9/2003 -0400, you wrote:
Hi there everyone, Probably something so simple i'll collapse with embarressment, just like with my spelling :-) But a quick question, when you perform an update or insert etc .... operation on a MySQL Database, how do you find out if it was successful or failed, so you can display the correct output? Currently if I add to a DB, for example, it goes to a page saying it updated successfully but without any error trapping, so even if it DIDN'T do it successfully it would still go to the next page. Thanks for your help :-) Chris


« previous php.general (#147084) next »