|
Posted by Helmut Woess on 10/16/06 11:03
Am 16 Oct 2006 00:47:31 -0700 schrieb hardik:
....
> id fid
> ___________________________________
> 1 1,2,3,4,5
>
> 2 11,12,13,14,15
>
> now to find values i am using query
>
> sql = SELECT * FROM test12 WHERE `fid` LIKE ('%1%')
>
> only problem in this query is it is selecting 1 and 11 and i require
> only 1 as i am giving one in %1%
> now any one have answer of this question then plz plz tell me ........
If ',' is your separator you can use:
SELECT * FROM test12 WHERE `fid` = '1' or `fid` LIKE ('1,%') or
`fid` LIKE ('%,1,%') or `fid` LIKE ('%,1')
bye, Helmut
Navigation:
[Reply to this message]
|