[thelist] SQL .. is there a better way ?

Michele Foster michele at wordpro.on.ca
Sun May 26 00:10:01 CDT 2002


Hey Rudy .. :)


----- Original Message -----
From: "rudy" <r937 at interlog.com>


| > If anyone wants to hash it out in IRC [1].. a few of us are there
|
| hi michele
|
| i went into the channel, said hi to the half dozen bots, and left

I was there .. unless it was when I got disconnected.  The only bot left is
thebot .. tho some people might act like bots at various times ;)


| i looked at your sql and it looks okay to me
|
| without seeing your data, i'd guess that you could probably get the counts
| from the first result set, and not even bother with the second
|
| assuming you know how to loop through query results more than once

ack .. sounds complicated.  Wish I still had access to weo .. to find out
how/when the comments and ratings are calculated for each article.  It's a
similar scenario, I think.  Oh well .. it does work the way it is ... I'm
just not *thrilled* with it. ;)

|
| if you must generate the counts in the query along with the details, that
| can be done with a UNION but it's ugly, and then you have to skip over the
| counts when printing the details

ok .. I'll take your word for it.  Not sure I've ever done a union before.

btw, I'm having a *really* difficult time trying to figure out when to use
what kind of join.  I must be missing the basic logic for it, as I always
seem to struggle trying to figure it out .. inner join, left join, right
join, outer join.  Do you have any good references?  I'm sure there are
*rules* .. I just don't know what they are.  Your RI article rocks .. we
need more!!  :)

Mich





More information about the thelist mailing list