<code> $list=$Model->query("select * from activity,apply where apply.ac_id=activity.ac_id and apply.unionid='{$unionid}' order by ap_id desc");</code>
How to use the $User->where('status=1')->order('create_time')->limit($Page->firstRow.', provided in tp for this sql statement) '.$Page->listRows)->select();
How should I write something similar to this? Thank you, Master
<code> $list=$Model->query("select * from activity,apply where apply.ac_id=activity.ac_id and apply.unionid='{$unionid}' order by ap_id desc");</code>
How to use the $User->where('status=1')->order('create_time')->limit($Page->firstRow.', provided in tp for this sql statement) '.$Page->listRows)->select();
How should I write something similar to this? Thank you, Master
The answer by the brother on the first floor seems to have missed the pagination. You can just add limit($Page->firstRow, $Page->listRows)
based on the answer by the brother on the first floor. Give it a try! Hope it helps you
<code>$list=M("activity ac")->join("left join apply ap on ac.ac_id=ap.ac_id")->where("apply.unionid=".$unionid)->order("ap_id desc")->select();</code>