Andy11548 Posted March 3, 2012 Share Posted March 3, 2012 I need this query to select 2 different pieces of information from the database using a $_GET method. But how do I make it so that I can have more than one WHERE? SELECT f1.cat_id as CatID, f1.cat_name as CatName, f2.sub_id as SubID, f2.sub_name as SubName FROM forum_cats as f1 LEFT JOIN forum_sub as f2 ON f1.cat_id = f2.cat_id WHERE f1.cat_id = '$cat' I need it to also do WHERE f2.sub_id = '$sub' I tried using the AND feature, but it doesn't work how I want it too. Thanks in advance, Andy. Quote Link to comment Share on other sites More sharing options...
Andy11548 Posted March 3, 2012 Author Share Posted March 3, 2012 Worked it out 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.