var crypto = require(‘crypto’); var http = require(‘http’); var fs = require(‘fs’); var mysql = require(’…/models/db.js’);
exports.backfind = function(req, res) { var input=req.body.input; var startdate=req.body.startdate; var enddate=req.body.enddate; var input1=parseInt(req.body.input1);
if (input==1) { mysql.query(‘select city from xiao ORDER BY City DESC limit 0,10’,function(err,rows,fields){ if (err) { return res.send(‘1’); } if (rows) { //console.log(rows) return res.send (‘2’+rows) } }) }else{ return res.send(‘3’); } };
exports.backfindp = function(req, res) { res.render(‘901’,{title:‘897157’}); };
web页面返回值为:2[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]