/    Sign up×
Community /Pin to ProfileBookmark

I have this query

[code]
insert into john_tm_cards
(user_id,
cyear,
cset,
number,
player,
condition,
notes,
serial_num,
price,
card_status_id)
values (
413,
1980,
‘stuff’,
‘stuff’,
‘stuff’,
‘stuff’,
‘stuff’,
’55’,
88,
1)
[/code]

but when I run it I get this error

#1064 – 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 ‘condition,
notes,
serial_num,
price,
card_status_id)
values (
413,
1980,’ at line 7

I have been looking over it for almost 1/2 an hour and am embarrassed to post. I am sure it is something obvious but I am not seeing it.

Thoughts?

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@dingbatMay 13.2009 — condition is a reserved word and can't be used as a column name. You might be able to quote it, but I tried and it didn't work.
Copy linkTweet thisAlerts:
@NogDogMay 13.2009 — Try quoting it with back-ticks.
×

Success!

Help @DARTHTAMPON spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...