By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

comma separated values in tables eg rooms 2,3 want value where rooms =3

P: 1
I am New In Sql
i have values in data base like
rooms = 2,3,4

i am passing value
get_example($rooms)
I want values like

Select * FROM `table` WHERE `room`='2'

I don't know dis is ryt method or Not
By Using IN method it gives me value for 1st value not for Others
Jan 29 '15 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,359
You should redesign and normalize your database. You should not be storing multiple pieces of information in one field like this, it makes it harder to query the data as you are experiencing right now.

You can read more about normalization in our article here: http://bytes.com/topic/access/insigh...ble-structures
Jan 29 '15 #2

Post your reply

Sign in to post your reply or Sign up for a free account.