cvs: phpdoc /en/reference/pdo/functions PDO-exec.xml

From: Date: Mon, 30 May 2005 01:33:13 +0000
Subject: cvs: phpdoc /en/reference/pdo/functions PDO-exec.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969368359@lists.php.net to get a copy of this message
dbs Sun May 29 21:33:13 2005 EDT Modified files: /phpdoc/en/reference/pdo/functions PDO-exec.xml Log: Make use of the existing entity for this problem. http://cvs.php.net/diff.php/phpdoc/en/reference/pdo/functions/PDO-exec.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc/en/reference/pdo/functions/PDO-exec.xml diff -u phpdoc/en/reference/pdo/functions/PDO-exec.xml:1.5 phpdoc/en/reference/pdo/functions/PDO-exec.xml:1.6 --- phpdoc/en/reference/pdo/functions/PDO-exec.xml:1.5 Fri May 27 14:53:28 2005 +++ phpdoc/en/reference/pdo/functions/PDO-exec.xml Sun May 29 21:33:12 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <!-- Generated by xml_proto.php v2.2. Found in /scripts directory of phpdoc. --> <refentry id="function.PDO-exec"> <refnamediv> @@ -55,23 +55,19 @@ <function>PDO::exec</function> returns <literal>0</literal>. </para> - <warning> - <para> - Do not rely on the return value as an indicator of success. The following - example incorrectly relies on the return value of - <function>PDO::exec</function>: - <programlisting role="php"> + &return.falseproblem; + <para> + The following example incorrectly relies on the return value of + <function>PDO::exec</function>, wherein a statement that affected 0 rows + results in a call to <function>die</function>: + <programlisting role="php"> <![CDATA[ <?php $db->exec() or die($db->errorInfo()); ?> ]]> - </programlisting> - The previous example is incorrect because the SQL statement may - legitimately return 0 affected rows, and <function>die</function> does - not distinguish between <literal>0</literal> and &false;. - </para> - </warning> + </programlisting> + </para> </refsect1>

« previous php.doc (#969368359) next »