|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-02-12 22:48 UTC] wez@php.net
[2005-02-13 09:56 UTC] Jared dot Williams1 at ntlworld dot com
[2005-02-19 07:44 UTC] Jared dot Williams1 at ntlworld dot com
[2005-02-27 00:25 UTC] wez@php.net
[2005-02-27 00:44 UTC] wez@php.net
[2005-02-27 20:32 UTC] wez@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 14 21:00:01 2025 UTC |
Description: ------------ I _think_ (and hope) I've encounted an sqlite bug with 3.0.7, which does not seem present in the "official" sqlite3 (3.0.8) cmdline tool. I cannot find the releveant sqlite ticket to prove this, but I think its highly unlikely PDO itself is causing it. Several columns are always coming back with containing NULL, even thou there is some data in some rows, but modifing the SQL so one of these columns in used in the WHERE clause. Reproduce code: --------------- $pdo = new PDO('sqlite:Xtvd.sql3', '', ''); // Returns 94 rows all with p.starRating = NULL $stmt = $pdo->query("SELECT DISTINCT p.* FROM Program AS p INNER JOIN Schedule AS s ON s.program = p.id WHERE s.time BETWEEN '2005-02-13T01:30:00Z' AND '2005-02-13T13:30:00Z';"); var_dump($stmt->fetchAll(PDO_FETCH_OBJ)); echo '<hr />'; // Returns 13 rows... $stmt = $pdo->query("SELECT DISTINCT p.* FROM Program AS p INNER JOIN Schedule AS s ON s.program = p.id WHERE s.time BETWEEN '2005-02-13T01:30:00Z' AND '2005-02-13T13:30:00Z' AND p.starRating IS NOT NULL ;"); var_dump($stmt->fetchAll(PDO_FETCH_OBJ));