The sql_showbase()
function is used to obtain a resource that can be used with sql_fetch()
detailing the tables that exist in the database.
It accepts 3 parameters:
-
$spip
empty by default, the parameter is used to list only the tables using the prefix defined for SPIP tables. Use'%'
instead if you want to list ALL tables, -
$serveur
, -
$option
.
Usage:
if ($q = sql_showbase()) {
while ($t = sql_fetch($q)) {
$table = array_shift($t);
// ...
}
The sql_alltable function is generally easier to use, since it directly returns a PHP array listing the various database tables.