List:General Discussion« Previous MessageNext Message »
From:<sinisa Date:December 12 1999 1:59pm
Subject:Re: Using the set database field
View as plain text  
rkurth@stripped writes:
 > Can I use the set field to place multiple items in that field and then 
 > be able to search thru that field to find what I am looking for.
 > LIKE
 > 
 > I have a field that is called subcatid that I populate with a
 >  SELECT NAME="subcatid[]" SIZE=5 MULTIPLE
 > it fill the subcatid with (like) 101,102,134,124
 > how can I search on this field with a query statement to find the 
 > records
 > that have say 134 in them and display them. Or what would I have 
 > to do 
 > to prep the data before I put it in the query.
 > I am totally lost on how to prised hear
 > 
 > 
 > 
 > THE TWOHOT MALL
 > http:/www.twohot.com
 > Richard Kurth
 > rkurth@stripped
 > 
 > 

Hi!

Yes, you can use SET in that way.

You can use both LIKE clause or FIND_IN_SET function.

Sinisa

+----------------------------------------------------------------------+
| TcX  ____  __     _____   _____  ___     ==  mysql@stripped            |
|     /*/\*\/\*\   /*/ \*\ /*/ \*\ |*|     Sinisa Milivojevic          |
|    /*/ /*/ /*/   \*\_   |*|   |*||*|     mailto:sinisa@stripped|
|   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*|     Larnaka, Cyprus             |
|  /*/     /*/  /*/\*\_/*/ \*\_/*/ |*|____                             |
|  ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^                            |
|             /*/             \*\                Developers Team       |
+----------------------------------------------------------------------+
Thread
Using the set database fieldrkurth12 Dec
  • Re: Using the set database fieldsinisa12 Dec