about pdo and sqlite2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yarco

    #1

    about pdo and sqlite2

    I'm trying hard to use pdo and sqlite2 without php_pdo_sqlite. dll
    extension.
    The code:

    $dsn = 'sqlite2::memor y:';
    $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?

Working...