astralaaron Posted September 20, 2010 Share Posted September 20, 2010 For some reason, a query similar to this: " DELETE FROM `tablea` WHERE `id`=1; DELETE FROM `tableb` WHERE `id`=1; "Works fine when i run it directly on the mysql server. But if i run it through mysql_query() in my php function it fails... It should work, right? Link to comment Share on other sites More sharing options...
Synook Posted September 20, 2010 Share Posted September 20, 2010 The original mysql PHP library can only run one query at once. You need mysqli to run multiple ones at once like that. Link to comment Share on other sites More sharing options...
astralaaron Posted September 20, 2010 Author Share Posted September 20, 2010 The original mysql PHP library can only run one query at once. You need mysqli to run multiple ones at once like that.thank you. Link to comment Share on other sites More sharing options...
Ingolme Posted September 20, 2010 Share Posted September 20, 2010 I'm not exactly certain, but I think this query probably would work: DELETE FROM `tablea`,`tableb` WHERE `id`=1; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.