Question about PDO
Posted: Fri Oct 31, 2008 4:25 pm
Code: Select all
$result_a = $db->prepare("SELECT ... WHERE `static_id`= :statistic_page ... ;");
foreach ($result as $row) {
$result_a->bindParam(':statistic_page', $row['statistic_page'], PDO::PARAM_INT);
$result_a->execute();
$result_a = $result_a->fetch();
Code: Select all
Fatal error: Call to a member function bindParam() on a non-object in C:\Program Files\Zend\Apache2\htdocs\gcms\module\backend\statistic\admin.statistic.php on line 62Code: Select all
foreach ($result as $row) {
$result_a = $db->prepare("SELECT ... WHERE `static_id`= :statistic_page ... ;");
$result_a->bindParam(':statistic_page', $row['statistic_page'], PDO::PARAM_INT);
$result_a->execute();
$result_a = $result_a->fetch();
What would be the correct solution to solve this task?