Jump to content

[SOLVED] IN() problem


Aureole

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.