PDO:sqlite doesnt INSERT data, yet no error
- by Phonethics
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.