transaction in mysql php
<?php MYISAM Not Support Transaction /* CREATE TABLE IF NOT EXISTS `table1` ( `id` int(11) NOT NULL auto_increment, `name` varchar(250) NOT NULL, `address` varchar(250) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; */ $host = 'localhost' ; $user = 'rajeev' ; $password = 'mypass' ; $db = 'demo' ; $con = mysql_connect ( $host , $user , $password ); mysql_select_db ( $db ); mysql_query ( "SET AUTOCOMMIT=0" ); mysql_query ( "START TRANSACTION" ); $query = "INSERT INTO table1 (name,address) values ('name','bhopal')" ; $result = mysql_query ( $query ); if( $result ){ ...