]> granicus.if.org Git - php/commitdiff
Fix bug in bindColumn() for drivers that implement native prepared statements
authorWez Furlong <wez@php.net>
Thu, 7 Jul 2005 12:45:40 +0000 (12:45 +0000)
committerWez Furlong <wez@php.net>
Thu, 7 Jul 2005 12:45:40 +0000 (12:45 +0000)
and that use the PDO rewriter to handle non-native parameter syntax.

ext/pdo/pdo_stmt.c

index c0adf1fce9e5e6859feca7256f8992e4d7de6678..1718dba8f63d09f3ffcf68e824b6e841cf669174 100755 (executable)
@@ -292,7 +292,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
                zend_hash_index_update(hash, param->paramno, param, sizeof(*param), (void**)&pparam);
        }
 
-       if (!rewrite_name_to_position(stmt, pparam TSRMLS_CC)) {
+       if (is_param && !rewrite_name_to_position(stmt, pparam TSRMLS_CC)) {
                return 0;
        }