Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getFormSubmitTime(){
- var form = FormApp.openById('dfsjfeifcnxzc121ii3ZZy');
- var formResponses = form.getResponses();
- var formResponse = formResponses[formResponses.length-1];
- var gettime = formResponse.getTimestamp();
- }
- function myonFormSubmit(e)
- {
- var ts=e.values[0];
- runQuery("INSERT INTO `TABLENAME` (`timestamp`,....) VALUES ('ts')");
- }
- function runQuery(qry)//This is pretty bare bones as it has no error handling built in. I removed it from a much more complicated function. Which you can find in the link in the text below.
- {
- var address='address';
- var user='user';
- var userPwd='pass';
- var db='db';
- var dbUrl='jdbc:mysql://' + address + '/' + db;
- var conn=Jdbc.getConnection(dbUrl, user, userPwd);
- var stmt=conn.prepareStatement(qry)
- stmt.execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement