PDA

View Full Version : phpmyadmin and textfile commands?


Joe
Sun 10th Jun '01, 8:40pm
I need to run about 50 commands in a row in phpmyadmin, basicly the commands are:
DELETE FROM forum WHERE forumid = '40'
upto:
DELETE FROM forum WHERE forumid = '90'

In phpmyadmin theres a text box where i can type these commands in one at a time, or a text file link just under that.

Is there a way i can put all these commands in a text file and run them at once? What do i use to tell phpmyadmin theres one command per line?

Mike Sullivan
Sun 10th Jun '01, 11:58pm
Don't do 50 queries. If you want to delete forums 40 thru 90:

DELETE FROM forum WHERE forumid>=40 AND forumid<=90;

If you want to only delete specific ones, use the IN function:

DELETE FROM forum WHERE forumid IN (40,41,43,45,67,68,82,90);

Joe
Mon 11th Jun '01, 12:54am
Mike, i love you :D