$sql = "
DELETE FROM `products` WHERE id = 123456;
INSERT INTO `products` SET `name` = 'abc', `price` = 100;
DELETE FROM `survey` WHERE id = 2522;
INSERT INTO `survey` SET `survey_name` = 'bla bla', `date` = 10-07-2018;
";
When I run it from PHPMyAdmin Then it's working. But when I run it from Codeigniter as $this->db->query($sql);
then it's not working.
How can I solve it??
Note: In $sql
variable there have chunk of queries. I want to hit server one time with chunk of queries. Then server executes those queries one by one. I never want to hit multiple time hit from PHP.