/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] anyone see anything wrong with this??

This is my Sql Statement:

[code=php]INSERT INTO submit_events (id, date, submit_date, ip, referer, bands, where, when, cost, author) VALUES ( ”, ‘2006-02-02’, ‘2006-03-26’, ‘69.166.56.12’, ”, ‘playing’, ‘Here’, ‘when’, ‘$4’, ‘Admin’ )
[/code]

The Error:

[CODE]line 25You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘where, when, cost, author) VALUES ( ”, ‘2006-02-02’, ‘2006-03-2’ at line 2
[/CODE]

I don’t see anything wrong with it… Could it be something in the DB??

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@LiLcRaZyFuZzYMar 26.2006 — WHERE is a keyword, it has a special meaning in MySQL, so you would need to put backticks around: where, do that for all fields and it should be ok
Copy linkTweet thisAlerts:
@Markbad311authorMar 26.2006 — ok, thanks a ton!
×

Success!

Help @Markbad311 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.19,
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,
)...