This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function write_calendar_from_events() { | |
var firebaseUrl = "https://officeiq-87f37.firebaseio.com/"; | |
var base = FirebaseApp.getDatabaseByUrl(firebaseUrl); | |
var data = base.getData("/users"); | |
var account = base.getData("/reverse"); | |
//Create a tech's previous events via calendar | |
Logger.clear() | |
var all_account = base.getData("/accounts"); | |
var reports = base.getData("/reportsheet"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db_path = Titanium.Filesystem.getFile(Titanium.Filesystem.getApplicationDataDirectory(), 'gtasktic.db'); | |
db = Titanium.Database.openFile( db_path ); | |
db.execute("CREATE TABLE IF NOT EXISTS keyval ( key TEXT, value TEXT )"); | |
//Insert | |
db.execute("INSERT INTO keyval (key, value) VALUES ('" +this.name +"', '"+ result +"')"); | |
//Read | |
var resultSet = db.execute("SELECT value FROM keyval WHERE key = '"+ this.name +"' LIMIT 1"); | |
result = resultSet.field(0); |