问题:
一段查询语言我在本机调试的时候能够正确取得结果,但是打包到服务器却得不到查询结果。但是其他页面和查询都正常。数据库内容都是一样的。
$where = "rs.role_id = " . $id . " and rs.user_id = s.id";
$model = M()->table(array("Think_user" => "s", "Think_role_user" => "rs"))->where($where);
$count = $model->count('id');
echo $count;这段代码是查询属于角色$id的用户列表。role_user只有两个字段role_id 和user_id
本机服务器:win8+upupx的集成包
Nginx/1.5.0 PHP/5.3.24 MySQL/5.6.11
服务器端服务器:
•Apache/2.2.15 (CentOS)
•Databa
PHP:5.3.3
均未做额外配置。
最佳答案