To answer Kgun first, You should stick to proper formatting with backticks even though it may or may not be used anymore (I will have to look it up, as far as I know the latest version of phpmyadmin still uses backticks with formatting).
The major reason I personally use backticks is to make my query a bit more readable. I have had some trouble before with $_SESSION['id'] and a row named id. Usually when I use the query: SELECT id FROM users WHERE id = '1'; etc etc. It hasn't happened to me recently so it could have been my syntaxing from awhile ago. I just know that I used to get database problems with reading the information.
Twist, You brought up a good point. mysql formatting does allow the semicolon I had forgotten that. However since he isn't executing it from the mysql command line it may be translated differently since in PHP reads semicolons as endlines unless they are escaped. semicolons are one of those characters that fall under the special chracters column so it may have to be syntaxed as: \;
I will check it just for the hell of it.
------EDIT-------
Twist is correct it does still work with the semicolon. I was wrong to assume php would interpret it as an endline chracter. However usually when using a semicolon it is for multiline purposes 
__________________
Chris - Trying to help others and learn myself!
Please login or register to view this content. Registration is FREE
Last edited by ctess; 11-23-2006 at 02:43 AM..
|