|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-21 14:01 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 16:00:01 2025 UTC |
Description: ------------ When executing a query, where field names are quoted, and using GROUP BY, the field names are returned with quotes around. This error may very well be in sqlite, and not with PHP, but I have no way of verifying that hunch. Using SQLite: SQLite support => enabled PECL Module version => 2.0-dev $Id: sqlite.c,v 1.166.2.13.2.7 2007/03/06 02:17:13 stas Exp $ SQLite Library => 2.8.17 SQLite Encoding => iso8859 Reproduce code: --------------- <?php $db = sqlite_open(":memory:"); sqlite_query($db, ' CREATE TABLE test ( id INTEGER PRIMARY KEY ) '); sqlite_query($db, "INSERT INTO test (id) VALUES (1)"); $result = sqlite_query($db, 'SELECT "id" FROM "test" GROUP BY "id"'); var_dump(sqlite_fetch_array($result, SQLITE_ASSOC)); Expected result: ---------------- array(1) { ["id"]=> string(1) "1" } Actual result: -------------- array(1) { [""id""]=> string(1) "1" }