Looktrne Posted February 9, 2008 Share Posted February 9, 2008 can I execute a command through mysql to drop all tables with the prefix phpbb_ I did some searching and I see alot of people writing scripts to do this is there not an easyway?? with sql? I figure there has to be thanks Paul also a quick question if I want to populate a database from another within a php script what is the process for opening a second database can I have 2 opened at once? thanks Paul Quote Link to comment https://forums.phpfreaks.com/topic/90258-drop-all-tables-with-prefix-phpbb_/ Share on other sites More sharing options...
fenway Posted February 9, 2008 Share Posted February 9, 2008 First question: possibly, using a stored procedure with the information schema tables. Second question: you can have as many db handles as you want. Quote Link to comment https://forums.phpfreaks.com/topic/90258-drop-all-tables-with-prefix-phpbb_/#findComment-462811 Share on other sites More sharing options...
Looktrne Posted February 10, 2008 Author Share Posted February 10, 2008 I wanna do something like DROP TABLES with PHP_ prefix so if there is 100 tables that start with PHP_ I wanna drop them all anyway??? Paul Quote Link to comment https://forums.phpfreaks.com/topic/90258-drop-all-tables-with-prefix-phpbb_/#findComment-462949 Share on other sites More sharing options...
svivian Posted February 11, 2008 Share Posted February 11, 2008 Pretty simple in PHPMyAdmin, just go to 'Databases', select the ones you want and drop them. Unless you're asking because you'll be doing this regularly? If so a PHP script would be easiest. Quote Link to comment https://forums.phpfreaks.com/topic/90258-drop-all-tables-with-prefix-phpbb_/#findComment-463571 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.