Aureole Posted January 26, 2008 Share Posted January 26, 2008 I'm trying to do something with IN() but it won't work. CODE: $queryC = "SELECT * FROM `forums` WHERE `forum_parent_id` = '{$_GET['id']}' AND '{$_SESSION['mem_group']}' IN(`show_forum`)"; END CODE `show_forum` is "2, 1, 3" and $_SESSION['mem_group'] is "1". 1 is in "2, 1, 3" so what's the deal here? EDIT: The code parser broke again. Link to comment https://forums.phpfreaks.com/topic/87879-solved-in-problem/ Share on other sites More sharing options...
Aureole Posted January 26, 2008 Author Share Posted January 26, 2008 It's beginning to look like I can't use IN() the way I'm trying to use it from a few Google searches but I'm still not entirely sure... there has to be some way to achieve what I'm trying to do. I'll keep experimenting, anyhow. Link to comment https://forums.phpfreaks.com/topic/87879-solved-in-problem/#findComment-449614 Share on other sites More sharing options...
sasa Posted January 26, 2008 Share Posted January 26, 2008 look function FIND_IN_SET() Link to comment https://forums.phpfreaks.com/topic/87879-solved-in-problem/#findComment-449624 Share on other sites More sharing options...
Aureole Posted January 26, 2008 Author Share Posted January 26, 2008 I did a quick Google search and looked at a few of the results, but I still don't understand how I can use FIND_IN_SET() to do what I need. I'll keep searching but can anyone show me how I'd use it to achieve my goal? EDIT: Got it! Thank you so much, saved me a whole lot of hassle. Link to comment https://forums.phpfreaks.com/topic/87879-solved-in-problem/#findComment-449627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.