Re: mysql multistatement query problem(if one query fail how we rollback)
Posted by: amit pathak
Date: March 16, 2011 08:11AM

now i got one solution of this, i need to use transaction here, for reading transaction go->
http://www.databasejournal.com/features/mysql/article.php/3382171/Transactions-in-MySQL.htm
so my query will look like-
mysql_query(conn,"begin;select * from account_db; select count(*) from account_dbb;select * from account_db;commit")
and where in the code u got one query fail there we can write
mysql_query(conn,"rollback");
mysql_query(conn,"commit");
now if any query failed all query updation will be rollback.............

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: mysql multistatement query problem(if one query fail how we rollback)
698
March 16, 2011 08:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.