Home » Structures » Structures_DataGrid » Bug #9873
Structures_DataGrid FAQ example misleading
Details
| Submitted | 2007-01-19 01:26 UTC |
|---|---|
| From | michael dot mauch at gmx dot de |
| Assigned | wiesemann |
| Status | Closed |
| Package | Structures_DataGrid |
| PHP Version | Irrelevant |
| OS | Linux |
| 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));