Skip to content

Instantly share code, notes, and snippets.

@khannedy
Created November 1, 2014 09:18
Show Gist options
  • Save khannedy/2a397341ce414663ea54 to your computer and use it in GitHub Desktop.
Save khannedy/2a397341ce414663ea54 to your computer and use it in GitHub Desktop.
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : ''
});
connection.connect();
connection.query('SELECT "SUKSES" AS result', function(err, rows, fields) {
if (err) throw err;
console.log(rows[0].result);
});
connection.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment