$sql="START TRANSACTION"; $result = mysql_query($sql); $sql="INSERT INTO `one`(`name`) VALUES('inden')"; $result = mysql_query($sql); $sql="UPDATE `two` SET name='OMG_Yoppe' WHERE id=3"; $result = mysql_query($sql); $sql="UPDATE `two` SET name='OMG_Ler' WHERE id=3"; $result = mysql_query($sql); $sql="COMMIT"; $result = mysql_query($sql) or die(mysql_error()); 

Each individual request is executed, but not through a transaction. No errors on the screen.

  • one
    And what engine (engine)? In mysql transactions it seems only for InnoDB - alexlz
  • converted via ALTER TABLE one ENGINE = InnoDb but the result is the same - koza4ok
  • alexlz make the answer .... - koza4ok

1 answer 1

I tried to repeat your script. Everything works fine: both insert and update (I don’t know here, one or two - the result of the first one disappears). No problem.