You can always test if your SQL statement successfully completed or not to
determine errors.  Using:

$myresult  =mysql_query($queryX,$myconn);

if (! $myresult)  {
   echo  mysql_error($myresult) ;
else {
    // nothing or
   echo "Query successful";


"Ryan Jameson" <[EMAIL PROTECTED]> wrote in message
I believe the PHP parser will completely process that page whether you
click stop or not. In my experience it's always been "all" or "nothing"
as long as you don't hit an error half way through which I'd imagine
could cause a problem.
<>< Ryan

-----Original Message-----
From: Peter Westergaard [mailto:[EMAIL PROTECTED]
Sent: Monday, January 05, 2004 3:14 PM
Subject: [PHP-DB] PHP Processing

I'm sorry, I feel dense coming to the list for this, because I'm SURE
I've read about this in the PHP or Mysql docs, but I can't seem to
locate where.

Let's say users submit a form which is processed by a PHP page which
performs a number of MySQL INSERT, UPDATE, and/or DELETE commands.

What happens if the user hits "Stop" or "Refresh" in their browser
before the transaction is complete - is there a possibility that
only some of the MySQL commands will complete?   Not a problem if
the services are all running well, but I'm thinking if things are
getting thrashed on the server for whatever reason, it might take
several seconds to complete the various SQL commands, also increasing
the likelihood of the user getting bored enough to start playing "bull
in a browser shop".

And since MySQL has no rollback feature that I'm aware of, how would you
best handle this dangerous potentiality?  Suggestions?  A humble
request:  Responses which begin with: "Don't use MySQL", please include
a good affordable alternative?


Peter Westergaard
[EMAIL PROTECTED]         ###   ICQ#: 10294457   ###
'Alright, you guys start coding.  I'll go find out what the customer

EASY and FREE access to your email anywhere:

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to