nodejs 简单的封装一些mysql模块 实现一个方法根据不同传参进行增删改查 首先要 npm install mysql 代码如下 function data(objHost,sql,callback,add=null){ let mysql = require('mysql'); var connection = mysql.createConnection(objHost); connection.connect(); //增删改查 if(add != null){ connection…
所用到的存储过程如下: temp_get_userCount: BEGIN #Routine body goes here... SELECT COUNT(id) as num FROM tbl_user; END temp_get_userid:参数为:IN count int(6), IN num int(4) BEGIN #Routine body goes here... ); ) * num; SELECT id from tbl_user LIMIT p_count, num; EN…