Database Update

I was wondering if anyone could let me know where I am going wrong with this code.

I have got a image that I’m using as a button and want the function related to update a local SQLite database…

local function rating\_1 ( event )  
 rating = 1  
 star\_rating.width = (rating \* 32)  
 star\_rating.x = 10 + (rating \* 16)  
 local update = [[UPDATE beer SET rating=]]..rating..[[WHERE rowid='1');]]  
 db:exec( update )  
end  

Thanks
George [import]uid: 26801 topic_id: 10178 reply_id: 310178[/import]

I’m not sure if I know the answer but what is that close parenthesis for at the end of your query? There doesn’t seem to be an open parenthesis

WHERE rowid=‘1’) [import]uid: 31262 topic_id: 10178 reply_id: 37166[/import]

Thank you!

Hadn’t spotted that… it was from where I copied a line of code to add values to the database. [import]uid: 26801 topic_id: 10178 reply_id: 37169[/import]