diff options
author | Scott MacVicar <scottmac@php.net> | 2008-07-28 23:01:02 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2008-07-28 23:01:02 +0000 |
commit | b8744bf3c991069baa7548a511f5fa2f290d9898 (patch) | |
tree | 57809b5c7677571a9fd9678ebc170650db56e065 /ext/sqlite3/sqlite3.c | |
parent | 1c8055a4ff2d7b1d2ba8c0cabfe1ae734609588c (diff) | |
download | php-git-b8744bf3c991069baa7548a511f5fa2f290d9898.tar.gz |
Fix error when fetchArray reaches the last row, and prototyp error
Diffstat (limited to 'ext/sqlite3/sqlite3.c')
-rw-r--r-- | ext/sqlite3/sqlite3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 850f8b7402..10724633c1 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -1013,7 +1013,7 @@ PHP_METHOD(sqlite3_stmt, bindParam) } /* }}} */ -/* {{{ proto bool SQLite3_stmt::bindValue(inte parameter_number, mixed parameter [, int type]) +/* {{{ proto bool SQLite3_stmt::bindValue(int parameter_number, mixed parameter [, int type]) Bind Value of a parameter to a stmt variable. */ PHP_METHOD(sqlite3_stmt, bindValue) { @@ -1252,9 +1252,11 @@ PHP_METHOD(sqlite3_result, fetchArray) add_assoc_zval(return_value, (char*)sqlite3_column_name(result_obj->stmt_obj->stmt, i), data); } } - break; + break; + case SQLITE_DONE: RETURN_FALSE; + break; default: php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to execute statement: %s", sqlite3_errmsg(sqlite3_db_handle(result_obj->stmt_obj->stmt))); |