Last active
August 29, 2015 14:05
-
-
Save phaidros7/57ad982fb615f9e7fddc to your computer and use it in GitHub Desktop.
This file contains 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 insertJob(site,node,time,gets){ | |
var connection = openConnection(); | |
var sqlInsert = "INSERT INTO job_result (sites_ID, node_ID, site_loaded_files, site_loading_time) "; | |
sqlInsert += "VALUES ((SELECT ID from sites WHERE site_name='" + site + "'), "; | |
sqlInsert += " (SELECT ID from nodes WHERE node_name='" + node + "'),"; | |
sqlInsert += gets + "," + time + ")"; | |
var connection.query(sqlInsert, function(err, result) { | |
if (err) throw err; | |
connection.end(); | |
// ?? return result.insertId); | |
// callback ?? | |
}// , callback ??) | |
} | |
myInsertid = insertJob("google.com","node01",1000,20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment