List:General Discussion« Previous MessageNext Message »
From:Fred Read Date:April 16 1999 10:13am
Subject:Re: about find_in_set(...,...)
View as plain text  
Yes! wrote:
> 
> I have a column called 'music' in 'nepal' table where it contains
> 
> group
> =============================
> jackson,nepathya group,ub40
> 
> I need to display the above row When the user input 'nepathya group'.
> 
> I used
> 
> mysql> select * from nepal where find_in_set('nepathya group',music);
> +-----------------------------+
> | music                       |
> +-----------------------------+
> | jackson,nepathya group,ub40 |
> +-----------------------------+
> 
> it worked!!
> 
> but it won't
> 
> mysql>select * from nepal where find_in_set('nepathya',music);
> Empty set (0.01 sec)
> 
> I think there is some bugs in find_in_set function.

From what you write, it would appear you misunderstand the 
operations of sets.

If the members of your set are;

    'jackson'
    'nepathya group'
    'ub40'

Then 'nepathya' is NOT a member of the set in the same way 
'jack' or 'ub' are not members of the set.


Does this help?
-- 

If it ain't opinionated, it ain't Rich Teer.
Some days I just can't decide if I'm a jek or a jerl...
Thread
about find_in_set(...,...)Yes!16 Apr
  • Re: about find_in_set(...,...)Fred Read16 Apr
  • Re: about find_in_set(...,...)Christian Mack16 Apr
Re: about find_in_set(...,...)Yes!16 Apr
  • Re: about find_in_set(...,...)Christian Mack16 Apr
  • Re: about find_in_set(...,...)Christian Mack16 Apr