- Sun Jan 07, 2018 2:33 am
#812728
Hi,
I create a trigger like this:
When I execute only insert query it is true.
How can I use lock tables in trigger?
Thanks
I create a trigger like this:
Code: Select all
But don't insert in my table1 and I don't get any errors.$db = '9092191375a376e9f2cb0d6057657207';
executeQuery('LOCK TABLES `table1` WRITE, `table2` READ;', $db);
executeQuery('insert into `table1` (`a`, `b`) values("data1", "data2");', $db);
executeQuery('UNLOCK TABLES;', $db);
When I execute only insert query it is true.
How can I use lock tables in trigger?
Thanks