]> granicus.if.org Git - php/commitdiff
should always bind columns after execute.
authorWez Furlong <wez@php.net>
Tue, 12 Jul 2005 02:38:39 +0000 (02:38 +0000)
committerWez Furlong <wez@php.net>
Tue, 12 Jul 2005 02:38:39 +0000 (02:38 +0000)
There're probably more of these to fix.

ext/pdo/tests/pdo_018.phpt

index 6c45869bd8cba755f6d2d5a8e85ee29cc0a5ed61..ba9aef7d346259a188d6bde335e1bf7ac7d77626 100644 (file)
@@ -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;
 }