<?php
require 'db.php';
$db = new Database('mysql', 'localhost', 'username', 'password', 'database');
$query = $db->Query('select * from table');
$querytext = $db->Queries($db->mQueryCount);
print 'Output generated by this query: '.$querytext.'<br>';
print '<table>';
while ($row = $db->FetchAssoc($query))
{
print '<tr>';
foreach ($row as $key=>$val)
{
print '<td>'.$key.': '.$val.'</td>';
}
print '</tr>';
}
print '</table>';
?>
|