Perhaps this is a common problem:
I would like to have a database field that contains multiple code numbers
and later search for the presence of one of the codes. What I have come up
with so far is using a "&" delimter between the code numbers to end up with
a field like:
12&5&34

When searching I'm using:
REGEXP 
'^$search_category$|^$search_category&|&$search_category&|&$search_category$
'

This seems to work fine, however I was wondering if there is a better way...

Any advice would be greatly appreciated.

- anatole


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