Re: Re: Newbie: Composition by Association - Pagination Class general question.
| From: | Tony Marston | Date: | Wed, 22 Jul 2009 12:16:09 +0000 |
| Subject: | Re: Re: Newbie: Composition by Association - Pagination Class general question. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295666@lists.php.net to get a copy of this message | ||
""MEM"" <talofo@gmail.com> wrote in message
news:000201ca0a9f$ca3fb110$5ebf1330$@com...
> > > As for (1) even in my pre-OO days I was used to using a single
> > > generic DAO for all database access. The only time that more
> > > than one DAO existed was for a different DBMS engine. This
> > > is why I have one DAO class for MySQL, one for PostgreSQL
> > > and another for Oracle. If you are incapable of writing a
> > > single generic DAO then it just shows that you still have a lot to
> > > learn. For an idea on how this works take a look at
> > >
> > > http://www.tonymarston.net/php-mysql/databaseobjects.html
> Before I dig in on this DAO, I'm wondering, where should I, and how could
> I,
> properly place a JOIN on this kind of pattern? Is it easy done or, on a
> JOIN
> scenario (and I will have a lot of them) I choose probably choose another
> pattern?
>
> Regards,
> Márcio
Adding a JOIN to the SQL statement which is generated by the framework is
very easy, as shown in my FAQ at
http://www.tonymarston.net/php-mysql/infrastructure-faq.html#faq08.
You have
two choices where you can place the code:
(1) In the component script.
(2) In the table class, as shown in
http://www.tonymarston.net/php-mysql/infrastructure-faq.html#faq84
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org