Re: DataGrid and DataObject->whereAdd()
| From: | Justin Patrin | Date: | Tue, 21 Dec 2004 15:39: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-16366@lists.php.net to get a copy of this message | ||
On Tue, 21 Dec 2004 09:26:24 +0100, Rodrigo Alvarez Fernández
<papipo@gmail.com> wrote:
> On Mon, 20 Dec 2004 16:27:27 -0800, Justin Patrin <papercrane@gmail.com> wrote:
> > On Tue, 21 Dec 2004 00:24:07 +0100, Rodrigo Alvarez <papipo@gmail.com> wrote:
> > > Does datagrid support Where-like with '%' clauses?
> > >
> > > I'm using it, and it seems that it always shows all records.
> >
> > How exactly are you calling whereAdd()?
> >
> > $do->whereAdd('column LIKE '%foo%');
> >
>
> Yes: $DO->whereAdd($searchField . ' like \'%' . $_GET[$searchField] .
> '%\'');
Looks fine to me. Have you tried turning on DO's debugging and see
what the query actually looks like?
DB_DataObject::debugLevel(5);
>
> > >
> > > Thanks,
> > >
> > > Rodrigo.
> > >
> >
> > --
> > Justin Patrin
> >
>
--
Justin Patrin