MySQL LIKE code not working in safari browser

Discussion in 'PHP' started by AimyThomas, Sep 11, 2012.

  1. #1
    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
     
    AimyThomas, Sep 11, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    LOL the browser has nothing to do with not executing the SQL query! it has to do with the scripting! :) please give us more info
     
    EricBruggema, Sep 11, 2012 IP
  3. Web Solutions

    Web Solutions Peon

    Messages:
    64
    Likes Received:
    1
    Best Answers:
    5
    Trophy Points:
    0
    #3
    PHP is a server-side scripting language and therefore does not in any way interact with your browser. For us to know what is going on there (no, it is not related to Safari), you need to provide a little bit more information (code, description of what it is supposed to do, etc.).
     
    Web Solutions, Sep 12, 2012 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    You probably have html errors that are preventing the data from being shown properly in Safari. Browsers typically deal with html errors slightly differently, where one will continue to show the html somewhat correctly while another will not.
     
    jestep, Sep 12, 2012 IP