Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.
Help keep Vanilla free:<?php
$DBHost = 'localhost';
$DBUser = 'your_database_user';
$DBPass = 'your_database_password';
$DBName = 'your_database_name';
$Connection = mysql_connect($DBHost, $DBUser, $DBPass);
if (!$Connection) {
echo 'Failed to connect to the database.';
die();
} else {
if (!mysql_select_db($DBName, $Connection)) {
echo 'Failed to connect to the '.$DBName.' database.';
die();
} else {
// If the database connection worked, get the tables in the db
$TableData = mysql_query('show tables', $Connection);
if (!$TableData) {
echo 'Failed to retrieve tables from database.';
die();
} else {
while ($Row = mysql_fetch_array($TableData)) {
$TableName = $Row[0];
if (strpos($TableName, 'LUM_') === false) {
// Do nothing, LUM_ was not found
} else {
if (!mysql_query('drop table '.$TableName, $Connection)) {
echo 'Failed to drop table '.$TableName;
die();
}
}
}
}
}
}
?>1 to 8 of 8