From 0c6bee02b0f291b294695f1aebcb85c883a5717c Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 30 May 2005 01:33:12 +0000 Subject: [PATCH] Make use of the existing entity for this problem. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@187293 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pdo/functions/PDO-exec.xml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) 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;. - - + +