diff --git a/reference/pdo/functions/PDO-exec.xml b/reference/pdo/functions/PDO-exec.xml index 5272941111..f55daefb44 100644 --- a/reference/pdo/functions/PDO-exec.xml +++ b/reference/pdo/functions/PDO-exec.xml @@ -1,5 +1,5 @@ - + @@ -55,23 +55,19 @@ PDO::exec returns 0. - - - Do not rely on the return value as an indicator of success. The following - example incorrectly relies on the return value of - PDO::exec: - + &return.falseproblem; + + The following example incorrectly relies on the return value of + PDO::exec, wherein a statement that affected 0 rows + results in a call to die: + exec() or die($db->errorInfo()); ?> ]]> - - The previous example is incorrect because the SQL statement may - legitimately return 0 affected rows, and die does - not distinguish between 0 and &false;. - - + +