Doc #9898 [Opn->Csd]: Example 34-3 has unused variable

From: Date: Sun, 21 Jan 2007 23:30:04 +0000
Subject: Doc #9898 [Opn->Csd]: Example 34-3 has unused variable
References: 1  Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9338@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=9898&edit=1 ID: 9898 Updated by: quipo@php.net Reported By: graeme at ijws dot com -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation PHP Version: Irrelevant -Assigned To: +Assigned To: quipo New Comment: This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Previous Comments: ------------------------------------------------------------------------ [2007-01-21 12:07:59] graeme at ijws dot com Description: ------------ "Example 34-3. Passing an array to execute()" in online documentation as of 2007-01-21 has reference to an unused variable "$types" which may confuse people: // Current documentation: // Once you have a valid MDB2 object named $mdb2... $types = array('integer', 'text', 'text'); $sth = $mdb2->prepare('INSERT INTO numbers VALUES (:id, :text, :lang)'); $data = array('id' => 1, 'name' => 'one', 'lang' => 'en'); $affectedRows = $sth->execute($data); Test script: --------------- // Expected documentation: // Once you have a valid MDB2 object named $mdb2... $sth = $mdb2->prepare('INSERT INTO numbers VALUES (:id, :text, :lang)'); $data = array('id' => 1, 'name' => 'one', 'lang' => 'en'); $affectedRows = $sth->execute($data); Expected result: ---------------- // Could show $types in a comment to let the reader know what they are. ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=9898&edit=1

« previous php.pear.doc (#9338) next »