PHP ver gevorderde |
|
Hey,
Hoe kan ik alle tables droppen die met prefix_ beginnen?
Kan dat gewoon met zo'n % of kan dat dan niet?
Groeten,
Jarno
Want ik heb nu dit:
if(mysql_query("DROP TABLE '".$arr['forum']."_acl_groups', '".$arr['forum']."_acl_options', '".$arr['forum']."_acl_roles', '".$arr['forum']."_acl_roles_data', '".$arr['forum']."_acl_users', '".$arr['forum']."_attachments', '".$arr['forum']."_banlist', '".$arr['forum']."_bbcodes', '".$arr['forum']."_bookmarks', '".$arr['forum']."_bots', '".$arr['forum']."_config', '".$arr['forum']."_confirm', '".$arr['forum']."_disallow', '".$arr['forum']."_drafts', '".$arr['forum']."_extensions', '".$arr['forum']."_extension_groups', '".$arr['forum']."_forums', '".$arr['forum']."_forums_access', '".$arr['forum']."_forums_track', '".$arr['forum']."_forums_watch', '".$arr['forum']."_groups', '".$arr['forum']."_icons', '".$arr['forum']."_lang', '".$arr['forum']."_log', '".$arr['forum']."_moderator_cache', '".$arr['forum']."_modules', '".$arr['forum']."_poll_options', '".$arr['forum']."_poll_votes', '".$arr['forum']."_posts', '".$arr['forum']."_privmsgs', '".$arr['forum']."_privmsgs_folder', '".$arr['forum']."_privmsgs_rules', '".$arr['forum']."_privmsgs_to', '".$arr['forum']."_profile_fields', '".$arr['forum']."_profile_fields_data', '".$arr['forum']."_profile_fields_lang', '".$arr['forum']."_profile_lang', '".$arr['forum']."_ranks', '".$arr['forum']."_reports', '".$arr['forum']."_reports_reasons', '".$arr['forum']."_search_results', '".$arr['forum']."_search_wordlist', '".$arr['forum']."_search_wordmatch', '".$arr['forum']."_sessions', '".$arr['forum']."_sessions_keys', '".$arr['forum']."_sitelist', '".$arr['forum']."_smilies', '".$arr['forum']."_styles', '".$arr['forum']."_styles_imageset', '".$arr['forum']."_styles_imageset_data', '".$arr['forum']."_styles_template', '".$arr['forum']."_styles_template_data', '".$arr['forum']."_styles_theme', '".$arr['forum']."_topics', '".$arr['forum']."_topics_posted', '".$arr['forum']."_topics_track', '".$arr['forum']."_topics_watch', '".$arr['forum']."_users', '".$arr['forum']."_user_group', '".$arr['forum']."_warnings', '".$arr['forum']."_words', '".$arr['forum']."_zebra'"))
if(mysql_query("DROP TABLE '".$arr['forum']."_acl_groups', '".$arr['forum']."_acl_options', '".$arr['forum']."_acl_roles', '".$arr['forum']."_acl_roles_data', '".$arr['forum']."_acl_users', '".$arr['forum']."_attachments', '".$arr['forum']."_banlist', '".$arr['forum']."_bbcodes', '".$arr['forum']."_bookmarks', '".$arr['forum']."_bots', '".$arr['forum']."_config', '".$arr['forum']."_confirm', '".$arr['forum']."_disallow', '".$arr['forum']."_drafts', '".$arr['forum']."_extensions', '".$arr['forum']."_extension_groups', '".$arr['forum']."_forums', '".$arr['forum']."_forums_access', '".$arr['forum']."_forums_track', '".$arr['forum']."_forums_watch', '".$arr['forum']."_groups', '".$arr['forum']."_icons', '".$arr['forum']."_lang', '".$arr['forum']."_log', '".$arr['forum']."_moderator_cache', '".$arr['forum']."_modules', '".$arr['forum']."_poll_options', '".$arr['forum']."_poll_votes', '".$arr['forum']."_posts', '".$arr['forum']."_privmsgs', '".$arr['forum']."_privmsgs_folder', '".$arr['forum']."_privmsgs_rules', '".$arr['forum']."_privmsgs_to', '".$arr['forum']."_profile_fields', '".$arr['forum']."_profile_fields_data', '".$arr['forum']."_profile_fields_lang', '".$arr['forum']."_profile_lang', '".$arr['forum']."_ranks', '".$arr['forum']."_reports', '".$arr['forum']."_reports_reasons', '".$arr['forum']."_search_results', '".$arr['forum']."_search_wordlist', '".$arr['forum']."_search_wordmatch', '".$arr['forum']."_sessions', '".$arr['forum']."_sessions_keys', '".$arr['forum']."_sitelist', '".$arr['forum']."_smilies', '".$arr['forum']."_styles', '".$arr['forum']."_styles_imageset', '".$arr['forum']."_styles_imageset_data', '".$arr['forum']."_styles_template', '".$arr['forum']."_styles_template_data', '".$arr['forum']."_styles_theme', '".$arr['forum']."_topics', '".$arr['forum']."_topics_posted', '".$arr['forum']."_topics_track', '".$arr['forum']."_topics_watch', '".$arr['forum']."_users', '".$arr['forum']."_user_group', '".$arr['forum']."_warnings', '".$arr['forum']."_words', '".$arr['forum']."_zebra'"))
Maar vind het zo raar staan
EDIT: werkt trouwens ook niet:
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 ''def_acl_groups', 'def_acl_options', 'def_acl_roles', 'def_acl_roles_data', 'def' at line 1
|