Bug #78497 [Nab]: SQLite3 version regression
| From: | fra dot martin at free dot fr | Date: | Fri, 06 Sep 2019 07:29:43 +0000 |
| Subject: | Bug #78497 [Nab]: SQLite3 version regression | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-222592@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=78497&edit=1
ID: 78497
User updated by: fra dot martin at free dot fr
Reported by: fra dot martin at free dot fr
Summary: SQLite3 version regression
Status: Not a bug
Type: Bug
Package: SQLite related
Operating System: Debian Jessie
PHP Version: 7.3.9
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Hi,
When querying from a SQLite View with alias, the field names change depending on the libsqlite3
version.
Ex:
// 'my_view' is defined as: CREATE my_view AS SELECT id FROM my_table
$q = $db->query("select m.id from my_view as m");
$r = $q->fetchArray(SQLITE3_ASSOC);
Then, to read the ID field:
With sqlite v3.8.7.1, I have to use $r['m.id']
With sqlite v3.28.0, I have to use $r['id']
When queyring from a Table with exactly the same syntax:
$q = $db->query("select m.id from my_table as m");
$r = $q->fetchArray(SQLITE3_ASSOC);
I can use $r['id'] with both SQLite versions.
Previous Comments:
------------------------------------------------------------------------
[2019-09-05 22:59:55] phpbugreports at gmail dot com
> SQLite3 version is 3.8.7.1 in latest PHP 7.3.9 (Debian Jessie repositories)
how does that bother upstream in any way?
------------------------------------------------------------------------
[2019-09-05 21:24:44] cmb@php.net
The bundled libsqlite3 is indeed version 3.28.0 in PHP 7.3.8 and
7.3.9. It is, however, not up to php.net to decide which version
is used by distros. Feel free to report this issue to Debian.
------------------------------------------------------------------------
[2019-09-05 20:03:34] fra dot martin at free dot fr
Description:
------------
SQLite3 version is 3.8.7.1 in latest PHP 7.3.9 (Debian Jessie repositories)
when PHP 7.3.8 had SQLITE 3.28.0
... big regression!
Test script:
---------------
echo SQLite3::version()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=78497&edit=1