/    Sign up×
Community /Pin to ProfileBookmark

mySQL Query problems

I can not for the life of me find out what is wrong with this query:

UPDATE Fees_1 SET category=’Facilities’, desc=’This is an invoice’, due=200.00, date=’ASDASD’ WHERE invoice=1

It must be simple but I’m just not seeing it. The error message i keep getting is:

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=’This is an invoice’, due=200.00, date=’ASDASD’ WHERE invoice=1′ at line 1

I’ve triple checked my syntax and I haven’t a clue what its being pissy about.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@dave17Nov 13.2007 — just looking at it quickly, you should be careful with the use of mysql key words (both desc and date). try putting 's around those ones, (ie: UPDATE Fees_1 SET category='Facilities', desc='This is an invoice', due=200.00, date`='ASDASD' WHERE invoice=1) so it doesnt try to interpret those as keywords. not sure if it'll fix it or not though.
Copy linkTweet thisAlerts:
@bejitto101authorNov 13.2007 — Yep, that fixed it! It didn't like the field name desc. Thanks a bunch!
×

Success!

Help @bejitto101 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.17,
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,
)...