tomdchi Posted September 13, 2013 Share Posted September 13, 2013 I am trying to figure out how to find the ID of a product based on the products on an invoice. From what I can tell, no link exists between invoice items (tblinvoiceitems) and the products (tblproducts) database tables. Am I missing something here? 0 Quote Link to comment Share on other sites More sharing options...
jclarke Posted September 13, 2013 Share Posted September 13, 2013 You need to join the tblinvoicetiems table with tblhosting to find the service and from the service you can get the package/product id. e.g. select packageid from tblinvoiceitems, tblhosting WHERE tblinvoiceitems.relid = tblhosting.id and tblinvoiceitems.type = 'Hosting' and invoiceid = '123' 2 Quote Link to comment Share on other sites More sharing options...
tomdchi Posted September 13, 2013 Author Share Posted September 13, 2013 Thanks just what I needed! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.