SQLite behaving bad?
| From: | Gerard Samuel | Date: | Tue, 17 Feb 2004 21:41:24 +0000 |
| Subject: | SQLite behaving bad? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32988@lists.php.net to get a copy of this message | ||
Currently using sqlite 2.8.11 (distributed by php snaps) with php4.3.5rc2
on windows XP.
Several months ago, I added support for sqlite in a database abstraction class
I created. It worked great then.
Im trying to see if things are still ok today, and its not.
For example executing the select query ->
select f.foo, b.bar from table f, table b where f.id = b.id;
Should return result table fields "foo" and "bar".
Instead its returning result table fields "f.foo" and "b.bar".
Example script
<?php
// sqlite connection parameters produce $conn resource id
$sql = 'SELECT f.foo, b.bar FROM table f, table b WHERE f.id = b.id';
$result = sqlite_query($conn, $sql);
if ($result === false)
{
die('For some reason');
}
while($row = sqlite_fetch_array($result, SQLITE_ASSOC))
{
// The expected results return nothing
var_dump($row['foo'], $row['bar']);
// The unexpected results return data
var_dump($row['f.foo'], $row['b.bar']); // You get the correct values
}
?>
So has anyone experienced this with the current sqlite/php combination?
This used to work correctly with sqlite 2.8.3 (distributed by php snaps)
Were there any notices that I may have missed over these past months??
Thanks for any help you may provide...