PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Structures » Structures_DataGrid » Bug #9873

Structures_DataGrid FAQ example misleading

Details

Submitted2007-01-19 01:26 UTC
Frommichael dot mauch at gmx dot de
Assignedwiesemann
StatusClosed
PackageStructures_DataGrid
PHP VersionIrrelevant
OSLinux
Roadmaps(Not assigned)

Comments

[2007-01-19 01:26 UTC] michael dot mauch at gmx dot de

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));