MySQL的查询数据能在另一个页面接受到吗
 发布于 12 年前  作者 yaoqi404  4352 次预览  最后一次回复是 12 年前  来自  

我在这个文件查询的数据,能在另一个页面返回来嘛?

exports.p=function(sql){

connection.query(sql,function(err,fields){

    //return this.fields;
return fields;

}) };

上面这个是查询页的代码

var config=require('./config');

var sql=“select * from user”; console.log(config.p(sql))

这个是需要接受的页面代码