Re: datagrid not doing limit query upon dataobject
| From: | Justin Patrin | Date: | Wed, 26 Jan 2005 00:43:06 +0000 |
| Subject: | Re: datagrid not doing limit query upon dataobject | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-17159@lists.php.net to get a copy of this message | ||
On Wed, 26 Jan 2005 11:21:53 +1100 (EST), daniel@electroteque.org
<daniel@electroteque.org> wrote:
>
> >
> > By "custom query" do you mean you're calling find(). If you're using
> > the DataObject DataSource you should *not* be calling find() on the
> > object. The DataSource should be doing that,
> >
>
>
> Custom query as in i hacked the find method to send a custom query which
> returns selected fieldswith normal join syntax, because joinAdd is tedious and hasnt been
> working. Because if i did a_query(sql);
>
> find would also send another query.
>
> how could i send a special query to the do without actually doing a find
> then ?
DG will run find() for you.
If you need to pass things in, this really isn't how find() is
supposed to work. Consider making a new function in your DO which uses
whereAdd, selectAdd, whatever, to set up the query and call this
before you pass the DO to DG. Again, you should not be calling find()
before sending the DO to DG as DG *will* call find() on the DO as long
as you're using the DataObject DataSource.
> >>
> >> Are you calling find() on the DO (don't do this)?
> >>
> >> umm i think i am ?
> >>
> >> What DB
> >> > backend are you using?
> >>
> >> mdb2 , with modified datasource for mdb2
> >>
> >
> > Ok. What is the actual database backend, though. mysql? oracle? If not
> > mysql, does MDB / MDB_DO support limit queries on that database?
> >
> > And seeing as this is with MDB_DO (which is not official) are you sure
> > limit() works correctly on it?
> >
> > --
> > Justin Patrin
> >
--
Justin Patrin