PDO Get All Table Names Operation

Description

Retrives all the table names from database.

Function Reference :
 
       			array dbGetTableName() 
             

Parameters

Name Type Required Parameter Info Example

Examples

               	 <?php
                  $sdb= new SimplifiedDB(); 
                  $sdb->dbConnect("localhost","username","password","dbuser"); 
                  $sdb->dbGetTableName(); 
	           ?> 
              

Result

Returns array of values. You can define which type of array you needs using $sdb->fetch_mode="ASSOC" or $sdb->fetch_mode="NUM" etc. By default, it retrives associative array.

If you use print_r($result_array), it will show output as in following format.

Array ( [0] => Array ( [Tables_in_simplifieddb] => user_blogs ) [1] => Array ( [Tables_in_simplifieddb] => user_roles ) [2] => Array ( [Tables_in_simplifieddb] => users ) )

Debuging

Debug Operation Result/Output
$sdb->query show tables
$sdb->last_insert_id
$sdb->rows_affected
$sdb->message_info Connected to database
$sdb->error_info

More Examples