<p>Using <strong>fetch_rowset</strong> and <strong>fetch_row</strong></p>
<br />
<strong>fetch_rowset</strong>
<blockquote><pre>
<?php
require_once "db.php";
$db = new db();
// Fill in the following
$tbl_name = '';
$sql = "SELECT * FROM " . $db->dbname;
$results = $db->fetch_rowset($sql);
print_r($results);
echo "</pre></blockquote><p>Fetching only the first row (<strong>fetch_row</strong>)</p><blockquote><pre>";
$results = $db->fetch_row($sql);
print_r($results);
?></pre></blockquote>
|