Jump to content

[SOLVED] MySQL IN - Help


killah

Recommended Posts

I have a table and a varchar field. In this field it has data like this:

 

1 => 1,2,3,4,5,6,7,8,9

2 => 10,11,12,13,14,15,16,17

3 => 10,14,17,29

4 => 32,45,86,10,1

 

When i try fetching like this:

 

SELECT upNAME FROM `upgrades` WHERE 10 IN(`upPLACES`)

 

It shows 2 & 3 and does not show number 4 where it should.

 

Is there a way i don't need to have the numbers be like this:

 

'32','45','86','10','1'

 

and not be in an array or some sort? I have mysql_error() turned on, and it produced no error.

 

Thanks in advanced.

Link to comment
https://forums.phpfreaks.com/topic/154817-solved-mysql-in-help/
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.