BigChief Posted May 17, 2010 Share Posted May 17, 2010 Wondering if anyone can simplify this query for me please? // $skillset = mysql_query("SELECT skillsetid FROM assigncourses WHERE userid='".$id."'") // $skillset2 = mysql_query("SELECT cid FROM cidsid WHERE sid='".$skillset."'") // $skillset3 = mysql_query("SELECT coursename FROM courses WHERE cid='".$skillset2."'") I have another piece of SQL that works however I can't seem to get it to work in this instance even when I change the code to suit what I need. $user = mysql_query("SELECT * FROM (assigncourses LEFT JOIN users on assigncourses.userid = users.id) LEFT JOIN skillsets on assigncourses.skillsetid = skillsets.skillid WHERE assigncourses.userid='".$id."' AND assigncourses.skillsetid > '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.