ITeye博客

mysql pool

共 1 篇文章

node-mysql pool

var mysql = require('mysql'); var pool = mysql.createPool(config); pool.getConnection(function(err, connection) { // Use the connection connection.query( 'SELECT something FROM sometable', function(err, rows) { // And done with the connection. connection.end(); // Don't use the connection here, it …

2016-07-15 17:37 · mysql pool