Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    7

    Unanswered: RLIKE or REGEXP -- too new for 3.23.56?

    I'm trying to run a simple search on my MYSQL database. I need it to recognize word boundaries. So far, that seems to mean I use RLIKE or REGEXP in a command something like this:

    SELECT * from products
    where prod_name RLIKE [[:<:]]something[[:>:]]

    My host's version of mySQL doesn't seem to like this. Is it my syntax, or the version, and is there some other way I can crack this if RLIKE isn't going to work?

    Thanks .....

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    use quotes

    where prod_name regexp '[[:<:]]something[[:>:]]'
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •