I think you are missing something.
>From the Manual:
FIND_IN_SET(str,strlist)
Returns a value 1 to N if the string str is in the list strlist
consisting of N substrings. A string list is a string composed of
substrings separated by `,'
characters. If the first argument is a constant string and the
second is a column of type SET, the FIND_IN_SET() function is optimised
to use bit arithmetic!
Returns 0 if str is not in strlist or if strlist is the empty
string. Returns NULL if either argument is NULL. This function will not
work properly if the first
argument contains a `,':
mysql> SELECT FIND_IN_SET('b','a,b,c,d');
-> 2
=====
I don't know what exactly you're trying to acheive, but I'm pretty sure
FIND_IN_SET is not what you are looking for.
Can you give table descriptions and what is the data you want at the end
of your query?
Etienne
Wiliam Stephens wrote:
>
> Hi
>
> How can I create an index of a SET field so that a FIND_IN_SET can search
> for a column number rather than name?
>
> Is this even possible in MySQL? It might seem like a bug?
>
> Thanks.
>
> Wiliam Stephens
>
> Web Developer
> http://www.fbagroup.co.uk
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
--
Etienne Marcotte
Specifications Management - Quality Control
Imperial Tobacco Ltd. - Montreal (Qc) Canada
514.932.6161 x.4001
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php