Can anyone tell me a more efficient way to structure this query?  It
works fast enough now, but I don't have that much data yet.  I am
concerned with future performance.

I need all of the rows from the project table that match the first where
clause.  The other information saves me from having to run a bunch of
additional queries to get information that I need to display.

select a.clientid, a.pid, a.writerid, a.dt_assigned, 
        b.itemname, 
        c.fname, c.lname, d.company 
from    projects a, 
        catalog b, 
        clients c, 
        partners d 
where a.writerid = 2 and 
        a.sku = b.sku and 
        a.clientid = c.id and 
        c.partnerid = d.id;

Thanks,

David McInnis


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to