tags:

views:

159

answers:

1

.

try
{
    $res = $db->exec($sql);
    if ($res === FALSE)
    {
        print_r($db->errorInfo());
        die();
    }
}
catch(PDOException $e)
{
    die($e->getCode().':'.$e->getMessage());
}
catch(Exception $e)
{
    die($e->getCode().':'.$e->getMessage());
}    

No error info, and neither does it get caught as an exception. Yet $res is FALSE and no data gets inserted.

Array
(
    [0] => 
)

But when I echo $sql and enter that query in SQLiteManager, it works inserting the data.

A: 

I used sqlite only with Python, but I had to commit insert/update statements there... Maybe that's the case here too? http://docs.php.net/manual/en/pdo.commit.php

robertbasic
Thats only when using transaction.0:There is no active transactionIm using exec which should commit execute immediately.
Phonethics