Home > Backend Development > PHP Tutorial > Let's take a look at the tp framework master

Let's take a look at the tp framework master

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-06 13:54:13
Original
2229 people have browsed it

<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>
Copy after login
Copy after login

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

Reply content:

<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>
Copy after login
Copy after login

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>
Copy after login
Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template