PDOStatement::errorCode
Fetch the SQLSTATE associated with the last operation on the statement handle
&reftitle.description;
stringPDOStatement::errorCode
&reftitle.returnvalues;
Identical to PDO::errorCode, except that
PDOStatement::errorCode only retrieves error codes
for operations performed with PDOStatement objects.
&reftitle.examples;
Retrieving a SQLSTATE code
prepare('SELECT skull FROM bones');
$err->execute();
echo "\nPDOStatement::errorCode(): ";
print $err->errorCode();
?>
]]>
&example.outputs;
&reftitle.seealso;
PDO::errorCode
PDO::errorInfo
PDOStatement::errorInfo