PDA

View Full Version : Searching for tables.


Neo
05-08-2002, 02:53 AM
Can someone help me figure out how to make this work for VB


function does_table_exist($table, $db) {
$result = $mysql_list_tables($db);
while (list($arr_tab) = mysql_fetch_array($result)) {
if($arr_tab==$table)
return true;
} else {
return false;
}
}
}



Thanks for your time.

Scott MacVicar
05-08-2002, 06:12 AM
function does_table_exist($table, $db) {
global $DB_site;
$result = $DB_site->list_tables($db);
while (list($arr_tab) = $DB_site->fetch_array($result)) {
if($arr_tab==$table) {
return true;
}
}
}

open up db_mysql.php add

function list_tables($db) {

return mysql_list_tables($db);

}

Neo
05-08-2002, 06:50 AM
Thank you Scott.