1.根据实际情况发现子查询用->buildSql();
$where['version'] = array('between',array($version+1,$now_version-1));
$subQuery = M('charging_version')->order('id desc')->buildSql();
$lists = M()->table($subQuery.' a')->group('dd_charging_id')->where($where)->select();
网友评论