diff options
author | Wez Furlong <wez@php.net> | 2005-07-18 14:40:49 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-18 14:40:49 +0000 |
commit | 4854dd71de93878da41b7df5c95fa030d3009995 (patch) | |
tree | aa016a2abc5b32bb0f1fcb3e3086f4e674974270 /ext/pdo_sqlite/sqlite_statement.c | |
parent | 8c57c3a9fed7b16913e19a4adb3764759c811fb0 (diff) | |
download | php-git-4854dd71de93878da41b7df5c95fa030d3009995.tar.gz |
this needs to be the column count, otherwise a db->query() that returns 0 rows
will fail rather than returning a statement with no rows.
Diffstat (limited to 'ext/pdo_sqlite/sqlite_statement.c')
-rw-r--r-- | ext/pdo_sqlite/sqlite_statement.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 49cba16ecb..100a388b5b 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -165,7 +165,7 @@ static int pdo_sqlite_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) { pdo_sqlite_stmt *S = (pdo_sqlite_stmt*)stmt->driver_data; - if(colno >= sqlite3_data_count(S->stmt)) { + if(colno >= sqlite3_column_count(S->stmt)) { /* error invalid column */ pdo_sqlite_error_stmt(stmt); return 0; |