Re: Checking query suceeded

From: Date: Wed, 02 May 2001 07:49:52 +0000
Subject: Re: Checking query suceeded
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51147@lists.php.net to get a copy of this message
> If I'm doing more than one query on a page what is the best way to check if > they all succeeded with out using transactions? You can check each query as it executes, and (perhaps) have your program logic do something intelligent in the case of individual failures. Another possbility is to do all the queries on some temporary table, and then do one "big" query that inserts/updates from the temp table to the "real" table... In general, though, once you get a good connection, and if your SQL is valid, queries don't fail very often... Not something you can rely on for mission-critical usage, but you may be over-worried about an infrequent event. Perhaps you could just code it to dump everything to an email to yourself if it ever pukes, so you can fix it by hand. (Kinda dangerous since it could flood your email box if the db goes down completely and you can't get to it to fix it...) -- WARNING richard@zend.com address is not working -- Use ceo@l-i-e.com Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm

« previous php.general (#51147) next »