Replace "q" calls
This commit is contained in:
committed by
Hypolite Petovan
parent
be6057b056
commit
b2edb85588
@@ -844,4 +844,18 @@ class DBStructure
|
||||
|
||||
return $retval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the columns of a table
|
||||
*
|
||||
* @param string $table Table name
|
||||
*
|
||||
* @return array An array of the table columns
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getColumns($table)
|
||||
{
|
||||
$r = DBA::p("SHOW COLUMNS FROM `" . $table . "`");
|
||||
return DBA::toArray($r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user