Sean Kelly
Sean Kelly

Reputation: 1

Why is this update query throwing a syntax error?

Here is my update string. I cannot figure out what the syntax error is even though it is a pretty simple query.

UPDATE building SET building_name='1901' building_lead_user='29' building_maint_user='23' WHERE building_id='4' LIMIT 1

building

Field   Type    Allow Null  Default Value
building_id int(6)  No  
building_name   varchar(30) Yes 
building_lead_user  int(6)  Yes 
building_maint_user int(6)  Yes 
status  int(1) UNSIGNED ZEROFILL    Yes 

Upvotes: 0

Views: 35

Answers (1)

danmullen
danmullen

Reputation: 2510

You're missing commas to separate the fields you're updating:

UPDATE building SET building_name='1901', building_lead_user='29', building_maint_user='23' WHERE building_id='4' LIMIT 1

Upvotes: 1

Related Questions