SELECT * FROM ORDER o INNER JOIN ORDER_LINE_ITEMS o_l
                 ON (o.id=o_l.id)
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> To: mysql@lists.mysql.com
> From: c...@hosting4days.com
> Subject: Basic SQL Query Help Needed
> Date: Tue, 25 Aug 2009 16:21:45 -0700
> 
> I have a basic invoice table with related line items table
> 
> Goal :    I'd like to get ALL the related line items - for ALL the  
> 'open' invoices...
> 
> -- this should get a list of open (unpaid) invoices
> 
> $query_invoice = "SELECT DISTINCT ID from invoices where status =  
> 'open'"
> 
> -------------
> 
> -- then I'd like to get ALL the line items - in ALL these 'open'  
> invoices - so how do I write the next SQL statement :
> 
> $query_items = ??? "SELECT ID, NAME from lineitems where --xx??? 
> xx--" ???
> 
> 
> 
> Thanks,
> c...@hosting4days.com
> 
> 
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=mgai...@hotmail.com
> 

_________________________________________________________________
With Windows Live, you can organize, edit, and share your photos.
http://www.windowslive.com/Desktop/PhotoGallery

Reply via email to