|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-02 17:59 UTC] felipe@php.net
-Status: Open
+Status: Feedback
[2012-11-02 17:59 UTC] felipe@php.net
[2012-11-11 11:21 UTC] php at msvplus dot de
[2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 19:00:01 2025 UTC |
Description: ------------ Since the update of php5.3.10 on php5.3.16 simple subqueries work with "WHERE" no more! Test script: --------------- <?php $db = ".test.sdb"; if(!function_exists('sqlite_open') and !dl('php_sqlite.dll')) die("SQLite-Extension Failed!\n"); elseif($conn = sqlite_open($db)) { @sqlite_exec($conn,"CREATE TABLE [test] ([id] INTEGER NOT NULL PRIMARY KEY, [char] VARCHAR(255) NULL); INSERT INTO test (id,char) VALUES (1,'foobar');"); // Create Test-Table if($array = sqlite_array_query($conn,"SELECT test FROM (SELECT id,char AS test FROM [test]) WHERE id = 1;")) var_dump($array); else die(sqlite_error_string(sqlite_last_error($conn))); } else die("Database $db not found!\n"); ?> Expected result: ---------------- array(1) { [0]=> array(2) { [0]=> string(6) "foobar" ["test"]=> string(6) "foobar" } } Actual result: -------------- Warning: sqlite_array_query(): near ";": syntax error in sqlite.php on line 9 SQL logic error or missing database