You could treate those delimited columsn just like
SET() columns and pass the following query:
SELECT * FROM cats WHERE category LIKE "%christmas%";
Graham Nichols wrote:
GN: Hi,
GN:
GN: I have a table which contains a column 'category'
GN:
GN:
GN: 'category' can be made up as records such as:
GN:
GN: christmas|birthday|easter
GN: easter|thanksgiving
GN: birthday|christmas|thanksgiving|easter
GN:
GN: etc .....
GN:
GN: As you can see, items are delimited with a '|' in the fields. If I wish to
GN: select all records which contain 'christmas', what is the correct sql syntax
GN: please?
GN: (This should return records 1 and 3 from the example shown above)
GN:
GN: I've tried several approaches, but have failed so far.
GN:
GN: Thanks for any pointers.
GN:
GN: kind regards, Graham Nichols
GN:
GN:
GN:
GN: ---------------------------------------------------------------------
GN: Before posting, please check:
GN: http://www.mysql.com/manual.php (the manual)
GN: http://lists.mysql.com/ (the list archive)
GN:
GN: To request this thread, e-mail <[EMAIL PROTECTED]>
GN: To unsubscribe, e-mail
<[EMAIL PROTECTED]>
GN: Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
GN:
--
sherzodR <[EMAIL PROTECTED]>
use CGI::Session;
---------------------------------------------------------------------
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