Bug #9873 [NEW]: Structures_DataGrid FAQ example misleading

From: Date: Fri, 19 Jan 2007 01:26:07 +0000
Subject: Bug #9873 [NEW]: Structures_DataGrid FAQ example misleading
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-9326@lists.php.net to get a copy of this message
From: michael dot mauch at gmx dot de Operating system: Linux Package version: PHP version: Irrelevant Package: Documentation Bug Type: Bug Bug description: Structures_DataGrid FAQ example misleading Description: ------------ The example given on http://pear.php.net/manual/en/package.structures.structures-datagrid.faq.php is a bit misleading, because it has the setRequestPrefix() _after_ the bind() calls, but it should be _before_ bind(). This is also consistent with the note below the example. Test script: --------------- In the example: $datagrid1->bind('SELECT * FROM trade', array('dsn' => DSN)); $datagrid2->bind('SELECT * FROM stock', array('dsn' => DSN)); $datagrid1->setRequestPrefix('trade_'); $datagrid2->setRequestPrefix('stock_'); Expected result: ---------------- Should be: $datagrid1->setRequestPrefix('trade_'); $datagrid2->setRequestPrefix('stock_'); $datagrid1->bind('SELECT * FROM trade', array('dsn' => DSN)); $datagrid2->bind('SELECT * FROM stock', array('dsn' => DSN)); -- Edit bug report at http://pear.php.net/bugs/bug.php?id=9873&edit=1 --

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