Re: DataGrid and DataObject->whereAdd()
| From: | Andrew Nagy | Date: | Tue, 21 Dec 2004 20:50:30 +0000 |
| Subject: | Re: DataGrid and DataObject->whereAdd() | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-16387@lists.php.net to get a copy of this message | ||
Rodrigo alvarez fernández wrote:
Yes: $DO->whereAdd($searchField . ' like \'%' . $_GET[$searchField] . '%\'');Rodrigo, I just released the latest version of SDG (0.6.0), try it out and see if it solves your problem. I am using something very similiar in one of my applications, here is my code: $journal = new Journal(); // This is a DataObject if (isset($_GET['lookfor'])) {
$journal->whereAdd("UPPER(title) LIKE '%" . strtoupper($_GET['lookfor']) . "%'");
}
// Bind DG to the data
$dg->bind($journal);
This code works for me, let me know if it solves your problem
Andrew