Once I had problem, in rollback my changes in MySQL.
I tried disabling autocomit. But problem was not resolved.
/* disable autocommit */
$mysqli->autocommit(FALSE);
$mysqli->rollback();
mysql_query("ROLLBACK");
Then finally, I found the actual problem.
By default in PhpMyadmin table type is MyISAM. Rollback will not work in MyISAM.
Then I changed the table in to InnoDB, It worked!!!