943,512 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Unsolved
  • Views: 809
  • MySQL RSS
Sep 17th, 2008
0

Mysql Query needed

Expand Post »
hi friends

I need the query , I have stored the ids like this 4,10,12,13,14 in one filed.

I need to search the id 4 avaliable in the one filed , how to search the number one single filed?


Please advise
Similar Threads
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006
Sep 17th, 2008
0

Re: Mysql Query needed

Can you give an example of what you are trying to achieve ?
Sponsor
Featured Poster
Reputation Points: 549
Solved Threads: 722
Bite my shiny metal ass!
pritaeas is offline Offline
4,155 posts
since Jul 2006
Sep 17th, 2008
0

Re: Mysql Query needed

in my table i have stored id like this
id name c_id
insert into (id,name,c_id)values( 1, john, 4,10,12,13,15)
Now i need seach id 10 avilable this row.how to write query,

Hope you clear
Reputation Points: 5
Solved Threads: 5
Junior Poster
vssp is offline Offline
197 posts
since Jul 2006
Sep 17th, 2008
0

Re: Mysql Query needed

mysql Syntax (Toggle Plain Text)
  1. SELECT * FROM table WHERE c_id LIKE '% 4%';
Reputation Points: 137
Solved Threads: 162
Posting Virtuoso
Shanti C is offline Offline
1,641 posts
since Jul 2008
Sep 17th, 2008
0

Re: Mysql Query needed

Use FIND_IN_SET() function.
Reputation Points: 29
Solved Threads: 47
Posting Whiz
mwasif is offline Offline
312 posts
since Dec 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: PHP MySQL Database Help
Next Thread in MySQL Forum Timeline: Transaction Rollback logic ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC