openBSD 3.8 php5.1.1 pdo sqlite query doesn't return a statement object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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...

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux