List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:April 16 1999 10:18am
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.
> 
> I am using MYSQL server version: 3.22.20a-log in Redhat Linux 5.2
> 
> TIA
> 
> Regards,
> YES!

Hi YES!

This isn't a bug. This is the desired behaviour.
You don't have a SET member called 'nepathya' in nepal.music, so what makes you belive you
can get it out?
If the column nepal.music is declared as CHAR or VARCHAR you can search with:
SELECT * FROM nepal WHERE musik like '%nepathya%';

Tschau
Christian

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