php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75404 Wrong information about return type of ResultSet
Submitted: 2017-10-19 03:05 UTC Modified: 2017-10-20 12:16 UTC
From: ich_bin_sehr_gerne at web dot de Assigned: cmb (profile)
Status: Closed Package: SQLite related
PHP Version: 7.1.10 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ich_bin_sehr_gerne at web dot de
New email:
PHP Version: OS:

 

 [2017-10-19 03:05 UTC] ich_bin_sehr_gerne at web dot de
Description:
------------
Hey there,

it appears to me that Sqlite3->query() always returns either "false" (if the query    was started with faulty sql statement) or otherwise an "Object", but never "true", even if the query was run against an empty database table.

Did I get anything wrong? What is the appropriate way to check if there were any matches in the results?

Regards, Christoph

---
From manual page: http://www.php.net/sqlite3.query
---



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-19 11:42 UTC] cmb@php.net
-Status: Open +Status: Verified -Package: Documentation problem +Package: SQLite related -Assigned To: +Assigned To: cmb
 [2017-10-19 11:42 UTC] cmb@php.net
Indeed, the documentation hints at a potential distinction between queries that
have a result (DQL statements) and resultless queries (DML statements, for
instance). However, this is not (and apparently has) never been implemented.
Actually, you either get an SQLite3Result object or FALSE.
 [2017-10-20 11:33 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=343266
Log: Fix bug #75404: Wrong information about return type of ResultSet
 [2017-10-20 11:33 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2017-10-20 11:33 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2017-10-20 12:16 UTC] ich_bin_sehr_gerne at web dot de
Thank you very much for your quick reaction!

It is my pleasure to contribute to this great project.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=89e04dc760422f552c7033bfe3365d7013bd888d
Log: Fix bug #75404: Wrong information about return type of ResultSet
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 26 10:01:23 2021 UTC