| MySQL LIKE code not working in safari browser MySQL LIKE code not working in safari browser |
AimyThomas

msg:4494070 | 4:21 am on Sep 12, 2012 (gmt 0) | 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
|
phranque

msg:4494107 | 7:10 am on Sep 12, 2012 (gmt 0) | the database query occurs on your server, not in your browser. therefore you should look for a safari-specific problem in in the document served, not in the query. does your html document have a DTD specification? have you validated the html?
|
lostdreamer

msg:4494169 | 9:25 am on Sep 12, 2012 (gmt 0) | How are you giving the query the $search variable? When you say that you first get the correct list, but in safari it will then refresh and show all rows, I'm thinking you're using javascript (ajax call?) or something? If this is the case, it could very well be that it first gives the right $search variable, but than (for some reason) it does another call without the $search variable, thus returning all rows.
|
phranque

msg:4494177 | 9:50 am on Sep 12, 2012 (gmt 0) | | I'm thinking you're using javascript (ajax call?) or something? |
| not javascript. from the OP:
|
lostdreamer

msg:4494216 | 10:51 am on Sep 12, 2012 (gmt 0) | @ phranque Of course the QUERY is in php ;) but as I said, this: 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. |
| leads me to believe there is some javascript involved in the frontend.
|
|
|