--TEST-- shows the error code of a SQL query with a mispelled table --SKIPIF-- --FILE-- setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT); $stmt = $conn->prepare('SELECT * FROM Person.Addressx'); $stmt->execute(); echo "Error Code: "; print $stmt->errorCode(); // free the statement and connection unset($stmt); unset($conn); ?> --EXPECT-- Error Code: 42S02