Jump to content

[SOLVED] mysql "SELECT x IN (x,y,z)"


thedarkwinter

Recommended Posts

hi

im trying to select * from a table where a variable represents 1 tag, and the item in the database has a list of tags:

 

For instance, my variable is 3. There are some records where tag (varchar) is "2,3,4" or maybe just "1,5" etc.

SELECT * FROM table WHERE (3 in (tags) );

returns 0 results.

 

Any ideas?

 

Thanks in advance!

Link to comment
https://forums.phpfreaks.com/topic/67201-solved-mysql-select-x-in-xyz/
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.