From: Wez Furlong Date: Tue, 12 Jul 2005 02:38:39 +0000 (+0000) Subject: should always bind columns after execute. X-Git-Tag: php-5.1.0b3~41 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f5a09e87eed25de29f07339a5e437be1a0cf6dce;p=php should always bind columns after execute. There're probably more of these to fix. --- diff --git a/ext/pdo/tests/pdo_018.phpt b/ext/pdo/tests/pdo_018.phpt index 6c45869bd8..ba9aef7d34 100644 --- a/ext/pdo/tests/pdo_018.phpt +++ b/ext/pdo/tests/pdo_018.phpt @@ -85,7 +85,6 @@ $objs[3] = new TestLeaf; $stmt = $db->prepare('SELECT id FROM classtypes WHERE name=:cname'); $stmt->bindParam(':cname', $cname); -$stmt->bindColumn('id', $ctype); $ctypes = array(); @@ -94,6 +93,7 @@ foreach($objs as $obj) $cname = get_class($obj); $ctype = NULL; /* set default for non stored class name */ $stmt->execute(); + $stmt->bindColumn('id', $ctype); $stmt->fetch(PDO_FETCH_BOUND); $ctypes[$cname] = $ctype; }