[9 Jun 99,, 10:41] Michal Samek wrote:
> In my e-shop I'm using the searching based on select like command;
> something like
> SELECT * FROM kat WHERE name LIKE '%some_text%';
> and when searching for the whole word:
> SELECT * FROM kat WHERE name LIKE '% some_text %';
> For this is necessary to maintain the name column with one space added
> before and after the name column value (to match starting and ending
> words). It's working but very ugly.
>
> Maybe there is some better way to search for the whole word?
Try regexp searching. Don't know if available at 6.4, but definitely is there at 6.5
SELECT * FROM kat WHERE name ~* ' your regexp ';
Emils Klotins e-mail: emils@mail.usis.bkc.lv
Systems Manager URL: http://www.usis.bkc.lv/
USIS Riga 7 Smilsu Str., Riga LV1050, LATVIA