forked from Wavyzz/dolibarr
Optimisation performances migration
This commit is contained in:
@@ -674,19 +674,23 @@ class DoliDb
|
||||
/**
|
||||
\brief Liste des tables dans une database.
|
||||
\param database Nom de la database
|
||||
\param table Nom de la table <20> rechercher
|
||||
\return array Tableau des
|
||||
\param table Filtre sur tables <20> rechercher
|
||||
\return array Tableau des tables de la base
|
||||
*/
|
||||
function DDLListTables($database, $table='')
|
||||
{
|
||||
$listtables=array();
|
||||
|
||||
$like = '';
|
||||
if ($table) $like = "LIKE '".$table."'"
|
||||
$result = mysql_query($this->db, "SHOW TABLES FROM ".$database." ".$like." ");
|
||||
if ($table) $like = "LIKE '".$table."'";
|
||||
$sql="SHOW TABLES FROM ".$database." ".$like.";";
|
||||
//print $sql;
|
||||
$result = mysql_query($this->db, $sql);
|
||||
while($row = mysql_fetch_array($result))
|
||||
{
|
||||
$this->results = $row[0];
|
||||
$listtables[] = $row[0];
|
||||
}
|
||||
return $this->results;
|
||||
return $listtables;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user