field with reserved name problem

scoob8254

Registered User.
Local time
Today, 04:16
Joined
Mar 2, 2008
Messages
76
i have a small db which i use to automate tasks for me, one of the things the db does as well is update my website for me, as i have the necessary mySQL tables linked to my db this is usualy quite easy to do, the website is a pre built cms btw

ive hit the snag where im using "insert into" to try and add some data to a table in the websites mysql db, the problem is its using date as a field name so im getting the error "syntax error in insert into statment",

is their a way to get the data i need inserted into the field, or am i going to have to rename the field :mad: , this would be a massive pain as means i would need to troll thru the code for the website changing the references to the field, and since its a pre built cms thats going to be a pain

any help appreciated
craig
 
Personally, I would change the name. But, you might be able to get by with just making sure you include square brackets around the name whenever you refer to it:

[Date]

MyTableName.[Date]

but with reserved words, it can be a real pain in the @$$ if you don't change them.
 
cheers for your reply, square brackets did the trick, which is a relief

:D:D:D:D
 

Users who are viewing this thread

Back
Top Bottom