How to write a complex query with doctrine?

How to write a 4-part query?

  • --1. Query 1 --Get the shipvia method from ORDERS first (the one that orderid 10248 used ) --2. Query 2: --Get a list of orderids from the ORDERS table which have the same shipvia as in query 1. --3. Query 3: --Get the productid from order details which are IN the list of orderids you got from query 2. --4. Query 4: --Get productnames from products where productid is IN the list of productIDs from orderdetails

  • Answer:

    i dont fully understand, do you need to list all the information you mentioned? are shipvia, orderids, productid, productnames columns in your table? won't this work? SELECT orderids, productid, productnames FROM ORDERS WHERE shipvia == 'ship method'

Davon at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.