mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
be aware of scrollable cursors; sqlite doesn't support them
This commit is contained in:
parent
4d5c40cd9a
commit
c77bd71315
2 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -122,7 +122,8 @@ static int pdo_sqlite_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_d
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
static int pdo_sqlite_stmt_fetch(pdo_stmt_t *stmt,
|
||||
enum pdo_fetch_orientation ori, long offset TSRMLS_DC)
|
||||
{
|
||||
pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data;
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue