• Selectall() with db_class

Feb
20

I have added an update to my db_class framework to allow you to select any table from your database. You may pass the new method the table name then what columns you would like to return or you may just say all for all columns. Once you call the method you may display the results with a while statement lie normal.

[php]
$db = new dbcon();
$accounts = $db->selectall(‘accounts’, ‘all’);

while($row = mysql_fetch_array($accounts)) {
print $row['name'];
}
[/php]

Download the db_class here: DB_CLASS.php

Leave A Comment!