Timestamp in Event Handler

I want to create a time stamp everytime a button is clicked. I’m currently trying to do this via code in the event handler section, but can’t figure out what the code should look like. Here is what I have :
system.db.runUpdateQuery("Insert INTO endrun_tstamp(‘stampTime’) Value (“t_stamp”))

I’m using my MySQL for a database. Is “system.db.runUpdateQuery” correct for inputting new items into a database?


Yes, system.db.runUpdateQuery can be used to insert values into the database. However, you query should look like the following:system.db.runUpdateQuery("INSERT INTO endrun_tstamp (stampTime) VALUES (CURRENT_TIMESTAMP)")Let us know if you have any other questions.