Various settings in the Suggest

This commit is contained in:
Hector Cortez
2011-03-10 16:24:21 +00:00
parent c8529214e6
commit 9fbcc602c8
5 changed files with 46 additions and 10 deletions

View File

@@ -709,4 +709,16 @@ class database extends database_base {
return $sql;
}
/**
* Determining the existence of a table
*/
function tableExists ($table, $db) {
$sql = "SELECT * FROM sysobjects WHERE name='" . $table . "' AND type='u'";
$bExists = true;
$oConnection = mssql_connect(DB_HOST, DB_USER, DB_PASS);
mssql_select_db(DB_NAME);
$oDataset = mssql_query($sql) || ($bExists = false);
return $bExists;
}
}