PDO:sqlite doesnt INSERT data, yet no error
Posted
by Phonethics
on Stack Overflow
See other posts from Stack Overflow
or by Phonethics
Published on 2010-04-21T13:42:30Z
Indexed on
2010/04/21
13:43 UTC
Read the original article
Hit count: 160
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.
© Stack Overflow or respective owner