Hi.

On Sat 2002-08-24 at 13:29:02 -0600, [EMAIL PROTECTED] wrote:
> 
> When I say:
> 
> SELECT * FROM product WHERE FIND_IN_SET("1", cat_id);
> 
> Does cat_id have to be of SET value.

No. It just has to be a comma-seperated list of values (where values
also may be none or one, i.e. no commas there). You can easily test
for yourself by trying

  SELECT FIND_IN_SET( "1", "-5,0,1,4,5," )

that it not even requires a column.

> The thing is, I cannot make it set column-type, since I have no idea
> what values it will be holding, but at the same time it will be
> comma seperated list of integers. So I'll have to make it either
> VARCHAR or TEXT.

The advantage of SET columns is that they are handled as binary
internally, i.e. it uses less space and searches are faster. If that
does not matter in your case, you will do fine with VARCHAR (or
TEXT).

Regards,

        Benjamin.

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
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

Reply via email to