|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-26 07:09 UTC] tony2001@php.net
[2006-10-04 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 22:00:01 2025 UTC |
Description: ------------ Second prepare() returns no object so execute() ends with PHP Fatal error: Call to a member function execute() on a non-object in Reproduce code: --------------- $stmt = $dbh->prepare("SELECT d_pk FROM d WHERE t=1"); print_r($stmt); $stmt->execute(); $stmt = $dbh->prepare("SELECT d_pk FROM d WHERE t=2"); print_r($stmt); $stmt->execute(); Expected result: ---------------- PDOStatement Object ( [queryString] => SELECT d_pk FROM d WHERE type=1 ) PDOStatement Object ( [queryString] => SELECT d_pk FROM d WHERE type=2 ) Actual result: -------------- PDOStatement Object ( [queryString] => SELECT d_pk FROM d WHERE type=1 ) PHP Fatal error: Call to a member function execute() on a non-object in