i have a table with auto increment field and i am using transactions when inserting new data.
now i find there are a few serial nos that are missing. suppose the last serial no was 475, now when i insert new row, the serial allotted to it is 481. how do i correct this.
table_A fields ID(Auto increment),Name,Address
table_B fields ID(Auto increment FK TO table_A ID),Tel,Fax,Email,Salesman
table_C fields ID(Auto increment FK TO table_A ID),monthly_commitment
mysql_query(BEGIN);
$a = mysql_query("INSERT INTO table_A VALUES('','name','address')");
$b = mysql_query("INSERT INTO table_B VALUES('','tel','fax','email','salesman')");
$b = mysql_query("INSERT INTO table_C VALUES('','monthly commitment')");
if(($a) && ($b) && ($c)){mysql_query("COMMIT");} else {mysql_query("ROLLBACK");}