Viruthagiri Posted July 5, 2010 Share Posted July 5, 2010 Guys i have three tables in my database. 1.x_masterlistofcourses 2.x_masterlistofpapers.3.x_masterlistofocuments x_masterlistofcourses structure: course_id course_name course_description x_masterlistofpapers structure: paper_id paper_no paper_name course_id paper_description dbase x_masterlistofdocuments structure: document_id paper_id paper_no document_name document_filename document_description In my front page I'm showing course name and description. The paper details for every course is stored in x_masterlistofpapers table. The documents for this papers is stored in x_masterlistofdocuments table. Now i want to get document name document description details details from database based on course_id and paper_id. Please any one solve my error. It is urgent. I written query as "select * from x_masterlistofdocuments d,x_masterlistofpapers p where p.course_id="+course_id+" group by d.paper_id=p.paper_id" What is wrong in my query. Bunch of thanks Quote Link to comment https://forums.phpfreaks.com/topic/206754-please-solve-this-mysql-table-query-its-urgent/ Share on other sites More sharing options...
Mchl Posted July 5, 2010 Share Posted July 5, 2010 What language you're doing it in? SELECT * FROM x_masterlistofdocuments d INNER JOIN x_masterlistofpapers p ON d.paper_id=p.paper_id WHERE p.course_id="+course_id Quote Link to comment https://forums.phpfreaks.com/topic/206754-please-solve-this-mysql-table-query-its-urgent/#findComment-1081252 Share on other sites More sharing options...
Viruthagiri Posted July 5, 2010 Author Share Posted July 5, 2010 What language you're doing it in? SELECT * FROM x_masterlistofdocuments d INNER JOIN x_masterlistofpapers p ON d.paper_id=p.paper_id WHERE p.course_id="+course_id Dude you are great........... Thanks....... Quote Link to comment https://forums.phpfreaks.com/topic/206754-please-solve-this-mysql-table-query-its-urgent/#findComment-1081258 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.