Open k0st8 opened 8 years ago
Hi, there. I was trying to do:
var cps = require('cps'); var db = require('node-mysql'); var box = new db.DB({{ host: 'localhost', user: 'username', password: 'pass' }); var basicTest = function(cb) { box.connect(function(conn, cb) { cps.seq([ function(_, cb) { conn.query('select * from DATABASE.TABLE limit 12', cb); }, function(res, cb) { console.log('Result:', res); cb(); } ], cb); }, cb); }; basicTest(function(){ console.log("Done"); });
Cannot get results without connecting to specific DATABASE
I believe you can just connect to any database and write your query with the DATABASE.TABLE format.
Hi, there. I was trying to do:
Cannot get results without connecting to specific DATABASE