Reputation: 3
Somewhat new to SQL. Cannot seem to figure out what i'm doing wrong!!
UPDATE mileagetable
SET EndMileage= `4599`,
EndTime= `9 : 12 AM`
WHERE mileagetable.id= 26
Basically i have a db called lets say db83838383 and a table in that db called mileagetable And 30 records identified by the primary key " id " I'm just trying to open a currently existent record "26" and fill in two empty feilds.
I cannot seem to get my query to work? Any help would be appreciated.
Upvotes: 0
Views: 38
Reputation: 219924
Ticks are for identifiers. Quotes are for string values:
UPDATE mileagetable
SET EndMileage= `4599`,
EndTime= `9 : 12 AM`
WHERE mileagetable.id= 26
should be
UPDATE mileagetable
SET EndMileage= '4599',
EndTime= '9 : 12 AM'
WHERE mileagetable.id= 26
Upvotes: 3