PDO Get All Tables Operation

Description

Select all records from the table, short-hand function for retriving all records from table.

Function Reference :
 array dbGetAll($table_name);

Examples

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

Result

Returns all rows of a given table
If you use print_r($result), it will show output as in following format.

Array ( [0] => Array ( [userId] => 1 [username] => Ram [password] => sdf123 [firstName] => Ram [lastName] => Yadav [role_id] => 116 [email] => y.ram11@gmail.com [gender] => Male [dob] => 1986-09-11 [website] => http://www.google.com [city] => Indore [state] => MP [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [1] => Array ( [userId] => 2 [username] => Prites [password] => sdfsfds213 [firstName] => Pritesh [lastName] => Gupta [role_id] => 10 [email] => y.ram11@gmail.com [gender] => Male [dob] => 1985-09-11 [website] => http://www.google.com [city] => Indore [state] => MP [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [2] => Array ( [userId] => 3 [username] => Mike [password] => lkosd12 [firstName] => Mike [lastName] => [role_id] => 10 [email] => y.ram11@gmail.com [gender] => Male [dob] => 1985-09-11 [website] => http://www.google.com [city] => Indore [state] => MP [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [3] => Array ( [userId] => 4 [username] => Sachine [password] => dfsda [firstName] => Sachine [lastName] => [role_id] => 11 [email] => y.ram11@gmail.com [gender] => Male [dob] => 1975-09-11 [website] => http://www.google.com [city] => Mumbai [state] => MH [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [4] => Array ( [userId] => 5 [username] => David [password] => asdf [firstName] => da [lastName] => vid [role_id] => 10 [email] => y.ram11@gmail.com [gender] => Male [dob] => 1955-09-11 [website] => http://www.google.com [city] => Mumbai [state] => MH [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [5] => Array ( [userId] => 6 [username] => helena [password] => asdf [firstName] => da [lastName] => vid [role_id] => 10 [email] => y.ram11@gmail.com [gender] => Female [dob] => 1955-09-11 [website] => http://www.google.com [city] => Mumbai [state] => MH [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1985-09-11 [visits] => 34 ) [6] => Array ( [userId] => 7 [username] => priya [password] => asdf [firstName] => da [lastName] => vid [role_id] => 8 [email] => p.riya@gmail.com [gender] => Female [dob] => 1955-09-11 [website] => http://www.google.com [city] => Mumbai [state] => MH [country] => India [pincode] => 2312 [phoneno] => 99229922 [faxno] => 90900 [comments] => comments about user [user_reg_date] => 1986-09-11 [visits] => 34 ) )

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