[thelist] SQL for what I think might be many to many
Ken Kogler
ken at kenkogler.com
Fri Apr 19 17:49:01 CDT 2002
> > However, if the names are unique enough, I'd suggest not
> > using the IDs, but the names of the condos and beaches instead.
>
> this is an excellent and strong suggestion
>
> good one, ken
Thx. :)
> > That way you cut down on the traffic going to the db.
>
> um, no, it's still just one call to the database, with the
> same number of
> records in the result set (although there might be fewer
> columns in the
> result set if you don't have ID numbers)
Oh, sure, if you use a *JOIN* of some kind... :-)
I had a total brainfart there, sorry... I was thinking you'd do the
beach/condo query, then look up all beaches returned from the beaches
table, and all the condos returned from the condo table. That is, of
course, a really dumb way of doing it. :-)
> no matter which direction you're going, you use a 3-way join
Always gotta do it the easy way, huh?
> no offence, ken, and not to single you out or anything, but i
> just had to say that
None taken... Didn't think it through all the way before firing off my
reply, that's all. Don't be afraid of correcting someone if they post
something incorrect... We're all here to learn, not stroke our egos. (At
least that's why I'm here!)
Of course, if you put your foot in your mouth, it's easier to type than
talk. :-)
-Ken Kogler
More information about the thelist
mailing list