]> granicus.if.org Git - php/commitdiff
hmmmmm. Bound params *were* working this way before, but now it seems that
authorWez Furlong <wez@php.net>
Sun, 26 Dec 2004 18:13:52 +0000 (18:13 +0000)
committerWez Furlong <wez@php.net>
Sun, 26 Dec 2004 18:13:52 +0000 (18:13 +0000)
I have to bind them as text.

ext/pdo_sqlite/sqlite_driver.c
ext/pdo_sqlite/sqlite_statement.c

index 7be1dab798a3883764e9e907ed331d4f159d2982..b77c231caa7fde9ffd0af7d0315975621a84d2d0 100644 (file)
@@ -127,8 +127,9 @@ static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
        stmt->methods = &sqlite_stmt_methods;
 
        i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail);
-       if (i == SQLITE_OK)
+       if (i == SQLITE_OK) {
                return 1;
+       }
 
        pdo_sqlite_error(dbh);
 
index fd61bb78ecdfda697f85f080e0e5b880a0e01217..cb513a31993a714b84ea74c5c2b0cee7b1322c81 100644 (file)
@@ -104,7 +104,7 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
                                                        param->paramno = sqlite3_bind_parameter_index(S->stmt, param->name);
                                                }
                                                convert_to_string(param->parameter);
-                                               i = sqlite3_bind_blob(S->stmt, param->paramno,
+                                               i = sqlite3_bind_text(S->stmt, param->paramno,
                                                        Z_STRVAL_P(param->parameter),
                                                        Z_STRLEN_P(param->parameter),
                                                        SQLITE_STATIC);
@@ -126,7 +126,6 @@ static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt TSRMLS_DC)
 {
        pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
        int i;
-       
        if (!S->stmt) {
                return 0;       
        }