Chris Andrews
asked on
mysql query needs changing from old to new mysql?
I'm moving from a server with an old version of mysql 3.23.58 to a newer version, 5.0.45
In my php scripts, I have a query like this:
INSERT INTO oys_reports (city,code,condition,f,c) VALUES ('Baltimore IH','NAMD','na','61','16.1 ')
which doesn't seem to work with mysql 5, I just get a syntax error.
Is there a different way to do the same thing now?
Thanks, Chris
In my php scripts, I have a query like this:
INSERT INTO oys_reports (city,code,condition,f,c) VALUES ('Baltimore IH','NAMD','na','61','16.1
which doesn't seem to work with mysql 5, I just get a syntax error.
Is there a different way to do the same thing now?
Thanks, Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@gamebits: Nice Catch! To avoid accidentally using a MySQL reserved word in my queries, I like to name columns like o_city, o_code, o_condition, etc.
ASKER
All Right! Thank you!
Gamebits gets the points, but thanks for the additional tidbit Ray.
Now for the stupid follow up question. I'm going to copy the code and paste it in to fix this, but for the future, where are backticks on my keyboard? Or do you just make them up with some kind of magic?
Gamebits gets the points, but thanks for the additional tidbit Ray.
Now for the stupid follow up question. I'm going to copy the code and paste it in to fix this, but for the future, where are backticks on my keyboard? Or do you just make them up with some kind of magic?
the key beside the key with the number one on your keyboard
ASKER
`
ahh, got it! `Thank you`!
ahh, got it! `Thank you`!