computerzworld wrote:I am having values stored in table in comma separated format like this.
1,2,4,5,7,9,11,15
That is probably the wrong approach to begin with. You should not be using multi-valued fields. Rather, you should create at least one more table to store those values, upon which the query you want would involve a join.
Bjom wrote:Have a look at the MySQL string functions
This should only be used as a last resort, e.g., if you have no control over the database schema or if it is otherwise infeasible to have it changed.