I have a google sheet that has data on it. I have a MySQL database that will be an exact copy of the Google Sheets data. I want to make it so when they save the page it will auto update a MySQL database with the new data that the website will pull data from. Here is my script so far. I can connect to the database but can't see how to update it with the sheets data automatically.
var server = 'server ip';
var dbName = 'db name';
var username = 'user';
var password = 'pass';
var port = '3306';
function CreateConnection() {
var url = "jdbc:mysql://" + server + ":" + port + "/" + dbName;
var conn = Jdbc.getConnection(url, username, password);
conn.close();
}
Here are my columns:
- ID (auto increments)
- CUs No
- Name
- Phone
- License No.
- Status 1-5
- Last Update