I have created a trigger like this:
create trigger mydb.t_count after insert
on mydb.titles
for each row
update mydb.authors set titles_count= 'titles_count'+1 where author_id=new.author_id;
While inserting a row in titles tables I am getting error stating
Truncated incorrect double value:titles_count
I think something has to be changed in update command. How to perform arithmetic operations in it? I need to increment the titles_count
value (author table) by 1 whenever a row is inserted in titles table...