node-query/node_modules/mysql2/examples/execute.js

13 lines
647 B
JavaScript
Raw Normal View History

var mysql = require('../test/common').createConnection();
mysql.execute("select ?+1 as qqq, ? as rrr, ? as yyy", [1, null, 3], function(err, rows, fields) {
//mysql.execute("select ?+?+? as qqq, ? as rrr", [1, 2, 5, "test"], function(err, rows, fields) {
console.log(err, rows, fields);
2015-01-28 15:33:44 -05:00
mysql.execute("select ?+1 as qqq, ? as rrr, ? as yyy", [3, null, 3], function(err, rows, fields) {
console.log(err, rows, fields);
mysql.unprepare("select ?+1 as qqq, ? as rrr, ? as yyy");
mysql.execute("select ?+1 as qqq, ? as rrr, ? as yyy", [3, null, 3], function(err, rows, fields) {
console.log(err, rows, fields);
});
});
});