openBSD 3.8 php5.1.1 pdo sqlite query doesn't return a statement object
| From: | Vladan | Date: | Tue, 20 Dec 2005 12:20:36 +0000 |
| Subject: | openBSD 3.8 php5.1.1 pdo sqlite query doesn't return a statement object | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-40884@lists.php.net to get a copy of this message | ||
Hi,
I installed php5.1.1 successfully with openBSD3.8 and my phpinfo shows pdo sqlite with a driver version 3.2.7 properly.
i open/create sqlite databases successfully however any most simple query doesn't return a statement object.
example:
--------
$db=new PDO("sqlite:test.db");
$sql="select * from import";
try
{
if(is_object($db))
{
echo "db is an object;\n";
}
else
{
echo "db seems not to be an object\n";
}
$sth=$db->query($sql);
if(is_object($sth))
{
echo "sth is an object;";
}
else
{
echo "sth='$sth' seems not to be an object";
}
}
catch (PDOException $e)
{
print "Error!: " . $e->getMessage() . "<br/>";
die();
}
the result is that $db is an object but $sth isn't.
it doesn't generate a pdo exception - however if you try to use any method with $sth it says that it's not an object...
anyone else experienced something like this? is it a bug? If it is I didn't find any reference to it in the bug list...