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());
}
There is no error information, and it also does not fall as an exception. However, $ res is FALSE and no data is inserted.
Array
(
[0] =>
)
But when I echo $sqland enter this query into SQLiteManager, it inserts data.
source
share