[thelist] [best practices] Join queries in MySQL?

DESCHAMPS Stéphane DvSI/SICoR stephane.deschamps at francetelecom.com
Tue Nov 26 12:18:01 CST 2002


Hi all,

I just read this:

> --- rudy <r937 at interlog.com> wrote:
> > select stuff
> >    from menuitem
> > inner join category X
> >        on menuitem.categoryID = X.categoryID
> > left outer join category Y
> >        on X.parentID = Y.categoryID

I was told last year by a senior PHP/MySQL developer that JOIN queries were too slow with the PHP/MySQL pair, so that he preferred to do simple queries looped through while statements.

(for example one query would retrieve categories and the second would retrieve the items in each category)

And now I see more and more JOIN queries on thelist.

Can anyone tell me what is true, what is best, am I misguided, is my hair going to fall?
(OK last question I know the answer)

TIA
s t e f
http://www.nota-bene.org/




More information about the thelist mailing list