#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    Hello again,

    I want to search a field for "gore" and return values such as:
    "gore,_al"
    "gore_and_horror"
    "done_with_gore"
    (and NOT "goreathon")

    I have a MySQL statement, but it returns no results. why?
    SELECT title FROM search_cat WHERE title REGEXP '(^|_)gore(,|_|$)';

    Thank you.
    yoshi
    datera@datera.com http://www.datera.com

    [This message has been edited by yoshi (edited November 04, 2000).]
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,647
    Rep Power
    4493
    Would this work?

    SELECT * FROM your_table WHERE title REGEXP '_?gore(_|,|$)';

    ---John Holmes...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    108
    Rep Power
    15
    Thanks for the help.

    I have found "(^|_)Gore(_|,|$)" to work, but I have just realized that it is case-sensitive. Any ideas to stop or work with that?

    Thanks again,
    yoshi
    datera@datera.com http://www.datera.com
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Posts
    81
    Rep Power
    15
    Use:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    SELECT * FROM your_table WHERE LCASE(title) REGEXP '_?gore(_|,|$)';
    [/code]

Similar Threads

  1. Replies: 2
    Last Post: January 27th, 2004, 04:34 PM
  2. select verification onsubmit
    By DrStein in forum HTML Programming
    Replies: 3
    Last Post: January 20th, 2004, 04:16 AM
  3. select distinct problem
    By mrengc in forum MS SQL Development
    Replies: 1
    Last Post: December 23rd, 2003, 08:50 AM
  4. Help with javascript, passing multiple select array to js then php
    By zen^Wallhack! in forum JavaScript Development
    Replies: 1
    Last Post: December 3rd, 2003, 02:56 PM
  5. Help with function to copy contents of select item
    By MilesDependent in forum HTML Programming
    Replies: 2
    Last Post: November 23rd, 2003, 07:16 PM

IMN logo majestic logo threadwatch logo seochat tools logo