brug try catch
try {
$pdo->exec ("QUERY WITH SYNTAX ERROR");
} catch (PDOException $e) {
if ($e->getCode() == '23000')
echo "Syntax Error: ".$e->getMessage();
}
taget fra Returkodeliste
brug try catch
try {
$pdo->exec ("QUERY WITH SYNTAX ERROR");
} catch (PDOException $e) {
if ($e->getCode() == '23000')
echo "Syntax Error: ".$e->getMessage();
}
taget fra Returkodeliste