Results 1 to 5 of 5
May 25, 2011, 05:55 #1
- Join Date
- Feb 2007
- 0 Post(s)
- 0 Thread(s)
using id from main select inside subquery
I am wondering if it is possible to use result of main select inside subquery. I am giving the below example. It is not very clear query, but the only thing you need to know and I am asking about is how to use table1.id inside subquery. I am getting error "Unknown column 'table1.id' in 'on clause'". Is it even possible to use data from "outer" select inside subquery?
(SELECT table2.budget FROM project_objects
INNER JOIN project_objects AS table2 ON table2.project_id=table1.id),
FROM project_objects AS ticket
INNER JOIN projects AS table1 ON table1.id=ticket.project_id
GROUP BY table1.id
Thanks a lot!Dilster.com - Dating blog where you can find new dating tips, advices and ideas or your partner.