Bug #64531 [Com]: SQLite3Result::fetchArray runs the query again.

From: Date: Fri, 08 Nov 2019 21:37:35 +0000
Subject: Bug #64531 [Com]: SQLite3Result::fetchArray runs the query again.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223650@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64531&edit=1 ID: 64531 Comment by: svnpenn at gmail dot com Reported by: phplists at stanvassilev dot com Summary: SQLite3Result::fetchArray runs the query again. Status: Verified Type: Bug Package: SQLite related Operating System: Windows XP SP3 32bit PHP Version: 5.4.13 Block user comment: N Private report: N New Comment: I am new to PHP SQLite so at first I was disappointed to find that "procedural style" functions were dropped with PHP SQLite3. Compare: - https://php.net/function.sqlite-open - https://php.net/sqlite3.construct but I was going to give the Object oriented style a chance. Then I came across this bug here: https://php.net/sqlite3stmt.execute#119404 and the example here still fails today: https://3v4l.org/MMGio I am surpised that its still open 6 years later. After realizing the poor PHP support for SQLite, I will simply call the SQLite binary going forward. Previous Comments: ------------------------------------------------------------------------ [2019-05-08 09:24:48] cmb@php.net Related To: Bug #77977 ------------------------------------------------------------------------ [2018-09-24 15:49:07] cmb@php.net While the fix for SQLite3::query() is trivial, a general fix for SQLite3Stmt::execute() is impossible, since it is allowed to ::execute() the same statement multiple times, which might trigger sqlite3_reset()s at unexpected times (see, for instance, bug #73530). ------------------------------------------------------------------------ [2018-01-31 16:37:12] thomas dot loch at fusion-core dot net I've just encountered this issue on Linux and Version 5.6.30 while using a similar generic wrapper around prepare/bind*/execute(). Is there still intent to fix this after five years? ------------------------------------------------------------------------ [2016-06-27 15:43:10] cmb@php.net Confirmed: <https://3v4l.org/MMGio>. And yes, this is a bug, and not a documentation problem (nonetheless, DDL and DML statements should use ::exec()). ------------------------------------------------------------------------ [2015-07-18 13:49:57] dupa at dupa dot com Same problem here, duplicate inserts with "query" method. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=64531 -- Edit this bug report at https://bugs.php.net/bug.php?id=64531&edit=1

« previous php.bugs (#223650) next »