Reminds me of adodc, adodb something like that. sort of...
i dont know the right code for this thing. -_-
sort of..
// Load the ADODB code
require 'adodb/adodb.inc.php';
// Connect to the database
$conn = &ADONewConnection('mysql');
$conn->connect('localhost','phpgems','phpgems1','phpgems');
// Send a SELECT query to the database
$rs = $conn->execute('SELECT flavor, price, calories FROM _
ice_cream');
// Check if any rows were returned
if ($rs->RecordCount() > 0) {
print "<table>";
print "<tr><TH>Ice Cream Flavor</TH><TH>Price per Serving</TH><TH>Calories per Serving</TH></TR>";
// Retrieve each row
while (! $rs->EOF) {
print "<tr><TD>{$rs->fields[0]}</TD><TD>{$rs->fields[1]}</TD><TD>{$rs->f ields[2]}</TD></TR>\n";
$rs->MoveNext();
}
print "</table>";
} else {
print "No results";
}