Jump to content

MySQL Complicated Query


HungryMind

Recommended Posts

Hi Friend.I want a query to find some ids from field. But it's so difficult for me.table field name: product_idsproduct_ids (value): 1, 2, 3, 4, 5 (These all values are in one field with comma, It's a set of id's in one record field).Now i want to search 3 & 4 from this field.If user find 3 & 4, so i'll have to search 3 & 4 from product_idsI've tried "like" & "in"... But! still getting issue.Please help me out.I Tried E.g:1) select * from table_name where product_ids in (3, 4) // Not Working...2) select * from table_name where product_ids like '%3%' or product_ids like '%4%' // Not Working...Please help me out friends.Specially waiting for (justsomeguy, thescientist, boen_robot) replies, please help friends.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...