后台代码如下:
$m = M('auth_rule');
$map['status'] = 1;
$map['type'] = 0;
$menu = $m->where($map)->select();
print_r($m->getLastSql());
print_r($menu);
打印的sql语句则是这样,
SELECT * FROM auth_rule
打印的查询结果$menu 也是全表的数据
数据库中这些字段y都有
$m = M('auth_rule');
$map['status'] = 1;
$map['type'] = 0;
$menu = $m->where($map)->select();
print_r($m->getLastSql());
print_r($menu);
打印的sql语句则是这样,
SELECT * FROM auth_rule
打印的查询结果$menu 也是全表的数据
数据库中这些字段y都有