0
回答
nodejs输出多行数据的结果,或者在结果中统计多少行数据
利用AWS快速构建适用于生产的无服务器应用程序,免费试用12个月>>>   
query: {
		attribute: {

		},
		method: function(e) {
			var _ = this.apis;
			//var sql = "select * from userbase where (telphone=:telphone or :telphone is null) and (ucreate=:ucreate or :ucreate is null) and (ulocation=:ulocation or :ulocation is null)";
			var sql = "select * from userbase where telphone like :telphone";
			var time = Date.now() - 946684800000;
			console.log(e.params.telphone.length + "	" + time);
			console.log(sql);
			_.sql.get(sql, {
				telphone: e.params.telphone
			}).success(function(result) {
				e.result({
					result: result
				});
			}).failure(function() {
				e.result({
					"failure": false
				});
			});
		}
	}


如果查询的数据是多行的。怎么输出多行数据的结果?或者统计多少行数据 显示在结果上

举报
snow_it_bobo
发帖于3年前 0回/961阅
顶部