Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   MySQL LIKE code not working in safari browser (http://www.go4expert.com/forums/mysql-code-safari-browser-t29072/)

AimyThomas 12Sep2012 09:23

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

shabbir 12Sep2012 09:33

Re: MySQL LIKE code not working in safari browser
 
Server side code is not depended on what browser it request the code?

It is like asking my car does not start because it does not have wheels but then engine is independent of wheels you have in car and though engine cannot run without wheels it does not mean it cannot be given ignition.

So if you think that it is because of Safari, your code is not getting executed, I think you have a long way to go before you understand where the problem is. Once you know where the problem is, you can think about how to solve it.

ManzZup 15Sep2012 17:07

Re: MySQL LIKE code not working in safari browser
 
the problem can be simply a browser error of sending the POST/GET data if the search string is user input
because some browsers send the content of a header different than the others
best would be to standardize your input, that is make it according to the common rules so that all the browsers aggree

if you post some more code it would be helpful


All times are GMT +5.5. The time now is 06:00.