
DigiOz Multimedia - 2006-03-03 16:27:59
First, I would like to thank you for writing this wonderful class. It has been a great help in working with MS Access (.mdb) databases.
I looked at your 'accesstest.php' sample file, and was not able to fetch any records using fetchObject() function. The fetchArray() funtion works fine, but the example did now show how to fetch multiple records using fetch array. So I modified the example to fetch multiple records. Here is how I used fetchArray() function:
$db=new DB;
$db->open("data.mdb");
$output = array();
$sql = 'Select * FROM [tableName]';
$db->query($sql);
while($output = $db->fetchArray())
{
echo "C1: ".$output[0]."<br>";
echo "C2: ".$output[1]."<br>";
echo "C3: ".$output[2]."<br>";
// ...
}
I hope this helps other users trying to use this great PHP Class.
Thanks,
Pete