|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2019-09-05 20:03 UTC] 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() PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 03:00:01 2025 UTC |
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.