Browser differences in PHP/MySQL?

Started by JamesWC, February 21, 2007, 09:24:14 AM

Previous topic - Next topic

JamesWC

I have a PHP script that contains a couple of MySQL queries. Everything runs smoothly when I load the page in Firefox, but loading the same page in Internet Explorer returns an error:

QuoteYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

I'm less concerned about the error itself (though of course I would like to fix it); it's the disparity between browsers that has me stumped. I would have thought that all processing of the MySQL code would take place server-side, unaffected by the user's choice of browser, so how can Firefox and IE be giving different results like this?

drossman



Maybe the browser is passing data to the script differently.  Can you print out the SQL staement from your php script before executing it?  That way you can compare the statement between the browsers.

Remaker

Quote from: JamesWC on February 21, 2007, 09:24:14 AM
I would have thought that all processing of the MySQL code would take place server-side, unaffected by the user's choice of browser

All the mysql code , query, php are proccesed inside the server and the client can never interfere in that proccess. The problem is with the code the php script outputs and how the browser use the information it gets to display on the screen.
I'm sure if you check the page source on firefox you will see somewhere inside the text lines the same error message, but it probably breaks the code and that's why firefox can't display the message.

So it's not a browser problem, but a problem with your query. You should fix your query.
Remaker - My blog - Actualitate.net

Advertisement: