Hey All!
I'm trying to start using more complex fetch methods in my querying. I pulled this from a php cookbook but its not working. When I run the script I get
Notice: Undefined index: Source_Certificate in /var/www/NovaDB/testvar.php on line 9
Notice: Undefined index: Source_Shareholder in /var/www/NovaDB/testvar.php on line 9
repeating many times.
The script:
<?php
error_reporting(E_ALL);
require_once 'MDB2.php';
$db = MDB2::connect('mysql://blah:blah@lblah/blah');
if (MDB2::isError($db)) { die("Can't connect: " . $db->getMessage()); }
$test = $db->query("SELECT Source_Certificate,Source_Shareholder FROM TransactionHistory");
foreach($test->fetchAll() as $row) {
print "{$row['Source_Certificate']} {$row['Source_Shareholder']}<br/>\n";
}
?>
I've checked the spelling on all the different fields to make sure it wasn't something simple. I'd appreciate any advice you guys have. Thanks for your time!