Chain2r Posted April 11, 2008 Share Posted April 11, 2008 Ok, so heres the code. CREATE TABLE cgmfx ( -> year int, -> month VARCHAR(20), ->shares FLOAT(10,3), ->gainloss FLOAT(10,2), ->change FLOAT(10,2) -> ); with this code i get this error. ERROR 1064 (42000) : you have an error in your sql syntax; check the manual that corresponds to your mysql server version for the right syntax to use near ' change FLOAT(10,2) ' at line 6. im using Mysql Version 5.0.51a php version 5.2.5 and apache 2.2.8 . I have tried google to no avail, i'm just restarting to learn Mysql, been a long time, but i did not have this problem before. Thanks Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted April 11, 2008 Share Posted April 11, 2008 Reading this will help - http://dev.mysql.com/doc/refman/5.0/en/reserved-words.html Quote Link to comment Share on other sites More sharing options...
stuart7398 Posted April 11, 2008 Share Posted April 11, 2008 CREATE TABLE `cgmfx` ( `year` int, `month` VARCHAR(20), `shares` FLOAT(10,3), `gainloss` FLOAT(10,2), `change` FLOAT(10,2) ) Quote Link to comment Share on other sites More sharing options...
Chain2r Posted April 11, 2008 Author Share Posted April 11, 2008 aw THANKS That fixed it all up your the best Thanks you two. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.