Posted by Yarco on 10/08/61 11:27
I'm trying hard to use pdo and sqlite2 without php_pdo_sqlite.dll
extension.
The code:
$dsn = 'sqlite2::memory:';
$buf = <<<SQL
CREATE TABLE test
(
id INT,
name VARCHAR(20),
pass VARCHAR(20)
);
SQL;
try {
$pdo = new PDO($dsn);
$pdo->query($buf);
//...
} catch (PDOException $e) {
//...
}
print_r($pdo);
But i get nothing.
And the pdo_sqlite of php document seems wrong, it use
'sqlite2:memory:' to define $dsn. I get error when i do that.
Anyone have exp. on pdo and sqlite?
Navigation:
[Reply to this message]
|