views:

55

answers:

1
A: 

you should check your error log and maybe post a part of it here? Because it seems a quirk of the multi-query function. I've tried your code with a mostly same configuration (except for the os, win server 2008) and it worked. I've also tried modifying it into six different query, and it also worked.

I've tried changing the query into the following:

  $query = <<<SQL
DELETE FROM `tags` WHERE `tags`.`name` = 'tag_one' AND `tags`.`id` = '1';
COMMIT;
UPDATE `tags_used` SET `used` = used-1 WHERE `tags_used`.`name` = 'tag_one';
COMMIT;
DELETE FROM `tags` WHERE `tags`.`name` = 'tag_two' AND `tags`.`id` = '1';
COMMIT;
UPDATE `tags_used` SET `used` = used-1 WHERE `tags_used`.`name` = 'tag_two';
COMMIT;
DELETE FROM `tags` WHERE `tags`.`name` = 'tag_three' AND `tags`.`id` = '1';
COMMIT;
UPDATE `tags_used` SET `used` = used-1 WHERE `tags_used`.`name` = 'tag_three';
COMMIT;
SQL;

hope it works for you

ZaQ
I added mysql log. And php log is clear. Look there is no semicolumn (;) in the end of my query and there is no 'Quit' command too. It doesn't looks good.
Sladex
I'm at lost... since it's InnoDB, you might try changing the query into the one I've edited above.. it worked for me
ZaQ