Hi,
i'm making a query with PDO and there is a SQL syntax error in it.
it does not echo 'ERROR'
any suggestions on how i should test a syntax error?
i'm making a query with PDO and there is a SQL syntax error in it.
Code:
$sql = 'BAD CODE';
$pdoStmt = $pdo->prepare($sql);
if (false === $pdoStmt) {
echo 'ERROR';
}
any suggestions on how i should test a syntax error?
Comment