xxreenaxx1 Posted March 29, 2011 Share Posted March 29, 2011 How can you make these two delete function as one. DELETE FROM test WHERE Tes_ID= 11; DELETE FROM question WHERE Tes_ID=11; Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/ Share on other sites More sharing options...
techdude Posted March 29, 2011 Share Posted March 29, 2011 Quote DELETE FROM test, question WHERE Tes_ID= 11; Post back if this helped. (Also, read the guidelines before posting.) -- techdude Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/#findComment-1193743 Share on other sites More sharing options...
xxreenaxx1 Posted March 29, 2011 Author Share Posted March 29, 2011 Nope. I tired few other ways as well. Nothing works. This is the error message I am getting Quote Cannot Execute:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE Tes_ID=11' at line 3 I am using function for this method. And on line 3 I have function comple($Test_ID){ Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/#findComment-1193867 Share on other sites More sharing options...
techdude Posted March 29, 2011 Share Posted March 29, 2011 Ooops! Sorry, I got the syntax incorrect. Try this instead: Quote DELETE t, q FROM test t, question q WHERE t.Tes_ID = q.Tes_ID AND t.Tes_ID = 27; Post back if this helped. -- techdude Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/#findComment-1193895 Share on other sites More sharing options...
xxreenaxx1 Posted March 30, 2011 Author Share Posted March 30, 2011 It worked. Thank you Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/#findComment-1194180 Share on other sites More sharing options...
techdude Posted March 30, 2011 Share Posted March 30, 2011 Glad I can help -- techdude Link to comment https://forums.phpfreaks.com/topic/232043-two-delete-function/#findComment-1194389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.