Advanced Search

Results 1 to 3 of 3

Thread: MySQL LIKE, small problem with returned html data

  1. #1
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question MySQL LIKE, small problem with returned html data

    I am working on a small and simple website search that uses the MySQL "LIKE" statement to return data. However, the data I'm searching also contains some html so if you search for "div" you will get a lot of results but because the html is interpreted by the browser, you will never find the string "div." in the results.

    So is there a way to somehow tell MySQL to query the database and return the results that don't match a predefined set of characters (html)? Or maybe a different way of displaying the data with PHP will solve the problem.

    I'm using MySQL 5.0.45 and PHP 5.2.4

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    Code:
    SELECT fields FROM table(s) WHERE property NOT LIKE value

  3. #3
    Join Date
    Jan 2007
    Location
    Charlotte, NC
    Posts
    82
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Ha! Should have known. Thanks Boogy, you're always there to help me out!

Bookmarks

Posting Permissions

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