Jump to content

MySQL Complicated Query


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.

Edited by HungryMind
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...