|
Posted by Rik on 03/02/07 11:51
Shelly <sheldonlg.news@asap-consult.com> wrote:
> So, my questions are:
>
> 1 - Other than an intermittentcy on the server, are there any ideas why
> this
> would happen?
Do you have a very, very good reason to use mysql_pconnect()? If not, just
use mysql_connect()....
> and much, much, more importantly:
>
> 2 - What would you reccommend to bulletproof this so that the customer is
> protected and the transaction gets processed. One idea I have is rather
> than "die", that I send an email to the seller with the insertion query
> so
> that it can be manually inserted later.
Your database should be reachable under all circumstances... If this is
not the case, you might consider different hosting. Not a solution, but
more of a temporary solution, would be to log it to a file, and run a
cronjob that checks the file every x minutes, and tries to enter the data
that couldn't be entered before. Do not bother your customers with extra
actions if your script/database/server fails... Get a better
script/database/server.
--
Rik Wasmus
[Back to original message]
|