[thelist] php/sql - getting the rows right help (still my menuitem thing)

Tom Dell'Aringa pixelmech at yahoo.com
Fri Nov 22 13:01:10 CST 2002


--- rudy <r937 at interlog.com> wrote:
> you haven't done anything to get the parents of the categories that
> the
> menuitems are related to
>
> you want
>
> select stuff
>    from menuitem
> inner join category X
>        on menuitem.categoryID = X.categoryID
> left outer join category Y
>        on X.parentID = Y.categoryID

So I have to REWRITE my current select, or add another one? (I'm
guessing we are rewriting it)

> the reason you want a left outer join is for those instances where
> the
> menuitem's category doesn't have a parent category

This kind of makes sense, I have *some* experience with joins when I
did a big project on SQL Server but it was awhile ago (man you don't
use it you lose it)

> sorting the output to get subcategories correctly "nested" under
> their
> parent categories is your next challenge

> how about i come over to your office and we can do this in person?

When can you be here! ;)

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list