基于ThinkPHP框架上的一条这样的语句
$voList = $pairing->query("select e.id,c1.name as bname,c2.name as cname from mmo_lmessage c1,mmo_lmessage c2,mmo_pairing e where c1.id=e.itemid and c2.id=e.pairid and type=1");
谁帮我转换为Join的语句 谢谢!
或是该如何使用Page分页
PHP的mysql语句
答案:2 悬赏:10
解决时间 2021-02-17 15:46
- 提问者网友:傀儡离开
- 2021-02-17 12:23
最佳答案
- 二级知识专家网友:野心和家
- 2021-02-17 13:49
$sql = "select e.id,c1.name as bname,c2.name as cname from mmo_lmessage c1,mmo_lmessage c2,mmo_pairing e where c1.id=e.itemid and c2.id=e.pairid and type=1";
$sql = $sql." LIMIT $p->firstRow".",$p->listRows";
$voList = $pairing->query($sql);
这样就能分页了
$sql = $sql." LIMIT $p->firstRow".",$p->listRows";
$voList = $pairing->query($sql);
这样就能分页了
全部回答
- 1楼网友:都不是誰的誰
- 2021-02-17 14:13
if($_post['submit']){<br>$sql="insert into table2(user,title,content,lastdate)values('$_post[user]','$_post[title]','$_post[content]',now())";<br>mysql_query($sql);<br>echo "<script language=\"javascript\">alert('发表成功');history.go(-1)</script>";<br>}
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯