Re: Checking query suceeded
| From: | Jordan Elver | Date: | Wed, 02 May 2001 19:00:47 +0000 |
| Subject: | Re: Checking query suceeded | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51154@lists.php.net to get a copy of this message | ||
Hi Richard,
Thanks for the advise. I was just wondering what other people do.
I don't think I'll worry about it too much ;-)
Cheers,
Jord
On Wednesday 02 May 2001 3:49 am, you wrote:
> > 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