Php transaction failed. PHPcode & lt ;? Php $ conn = mysql_connect ('localhost', 'root', '000000') ordie (& quot; 123123 !!! & Quot;); mysql_select_db ('eshop ', $ conn); mysql php transaction failed,
PHP code
The above code cannot be submitted due to sql2 error. But after I run it, I still inserted a piece of data? Sadly, why don't I perform rollback and delete the data? Puzzled.
------ Solution --------------------
Because the first transaction you write will not be rolled back.
To roll back the first entry
Start transaction;
Insert ..
Insert...
Commit;
------ Solution --------------------
Why is it difficult for you to know it.
------ Solution --------------------
Innodb supports transactions. myisam does not support transactions.
------ Solution --------------------
[Quote = reference:]
[Quote = reference:]
Why is it difficult for you to know it.
[/Quote]
Oh, my God, you said it was not difficult. you asked me how many people can visit the forum.
You can really blow.
[/Quote]
How many people can... If you say this, you are not afraid of losing face. let's look at the evolution of TAOBAO's public technical architecture, and see how people can split tables and databases and ensure that transactions can be done.
[Quote = reference:]
Reference:
Innodb supports transactions. myisam does not support transactions.
Good guy, positive solution. It seems that the latter has to be abandoned.
[/Quote]
In this case, the landlord is not afraid of ridicule.