SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast AimyThomas's Avatar
    Join Date
    Sep 2011
    Posts
    46
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    MySQL LIKE code not working in safari browser

    Hello,

    I am looking for database

    PHP Code:

    SELECT * FROM table_name WHERE event LIKE '%" . $search . "%' OR date LIKE '%. $search . "%'

    This works fine in Firefox and in IE, but when i try it in safari, it seems to pull up the right results but then straight away changes and gives me all the results from the table. I am sure it has soomething to do with the LIKE operator because when i tried

    This script works fine in Firefox and in Chrom, but when i try it in safari browser, it seems to pull up the right results but then as the crow flies away changes and gives me all the results from the table.

    I am sure it has something to do with the LIKE coad because when i tried

    SELECT * FROM table_name WHERE date = (the date i was trying to search for)

    Kindly provide me solutions

    Thanks in advance

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Such things are not dependent on browser...unless you are doing something to make it so. But you haven't provided any code to determine it as such.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,250
    Mentioned
    59 Post(s)
    Tagged
    3 Thread(s)
    why are you using LIKE on a "date" column? something is wrong there...
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"


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
  •