Hello,

I want to get the query excuted on every table in my sqlite data base with
the new values inserted or updated and save the query in another table in
the same database. I try with this code to create the trigger:

CREATE TRIGGER trig_insert_contact_req AFTER INSERT ON contact
BEGIN
INSERT INTO synctable (s_tab,s_req,s_id) VALUES ('contact','INSERT INTO
contact VALUES (new.contactnom, new.contactage, new.contactmobile,
new.contactmail, new.contactadresse);',new._idcontact) ; 
END;

It is clear that those variables (new.contactnom, new.contactage,
new.contactmobile, new.contactmail, new.contactadresse) are token as String,
I tried many combinations (‘ + new.contactnom +’, ‘ " +" new.contactnom
"+"’,…) to resolve this problem but I failed  !

Could someone help me.

Thank you in advance.

-- 
View this message in context: 
http://www.nabble.com/get-query-from-sqlite-database-with-triggers-tp25434506p25434506.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to