summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite_driver.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2005-01-12 06:08:59 +0000
committerWez Furlong <wez@php.net>2005-01-12 06:08:59 +0000
commitc77bd713151b79cc6bdc87f7677afa44d73c13ba (patch)
tree2b99475be63e7405aa9841dac5cfac3d6758c9d1 /ext/pdo_sqlite/sqlite_driver.c
parent4d5c40cd9a871a74bae512e8a3255fce0268426f (diff)
downloadphp-git-c77bd713151b79cc6bdc87f7677afa44d73c13ba.tar.gz
be aware of scrollable cursors; sqlite doesn't support them
Diffstat (limited to 'ext/pdo_sqlite/sqlite_driver.c')
-rw-r--r--ext/pdo_sqlite/sqlite_driver.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c
index 3ebdb07e3a..391132e619 100644
--- a/ext/pdo_sqlite/sqlite_driver.c
+++ b/ext/pdo_sqlite/sqlite_driver.c
@@ -123,6 +123,12 @@ static int sqlite_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len,
stmt->driver_data = S;
stmt->methods = &sqlite_stmt_methods;
+ if (PDO_CURSOR_FWDONLY != pdo_attr_lval(driver_options, PDO_ATTR_CURSOR, PDO_CURSOR_FWDONLY TSRMLS_CC)) {
+ H->einfo.errcode = SQLITE_ERROR;
+ pdo_sqlite_error(dbh);
+ return 0;
+ }
+
i = sqlite3_prepare(H->db, sql, sql_len, &S->stmt, &tail);
if (i == SQLITE_OK) {
return 1;