thndr Posted February 2, 2006 Share Posted February 2, 2006 Hello again,Small problem.[code]INSERT INTO trans (Amount,Desc,Date,Empty) VALUES('5.95','Fees','02.01.06','W')[/code]it returns:[code]Query failed : 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 'Desc,Date,Empty) VALUES('5.95','Fees','02.01.06','W')[/code]Thats not working, what did I miss? The first field in the DB structure is ID, and i moved servers, I used to just use "INSERT INTO trans VALUES ('','price') etc, but it doesnt allow that for the ID field on new server so Im trying to do it the other way and its not working. TIA.John Quote Link to comment Share on other sites More sharing options...
wickning1 Posted February 2, 2006 Share Posted February 2, 2006 DESC is a reserved word (DATE should be too but mysql allows it). Try this:[code]INSERT INTO trans (Amount,`Desc`,Date,Empty) VALUES('5.95','Fees','02.01.06','W')[/code] Quote Link to comment Share on other sites More sharing options...
thndr Posted February 2, 2006 Author Share Posted February 2, 2006 Ah I should have known I think I had problems with that before, thanks! Quote Link to comment Share on other sites More sharing options...
fenway Posted February 2, 2006 Share Posted February 2, 2006 DATE is reserved, but only for CREATE/ALTER TABLE statements. Still, no need to use it. 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.