dwz php 换页
最后搞PHP+DWZ做网站后台,网上找到这代码,试用正常可以换页,但是我想加一个条件caidid=caidid分页,直接在$sql= "select id,u_id,u_name,last_logintime,last_ip,last_imei,last_phone_number,last_logintype from users where CateId='$CateId2' and $tiaojian like '%$neirong%' order by $orderField {$orderDirection} limit {$fup_page},{$numPerPage}";就换不了页了,请问要怎设置?
<?php require_once '../include/config.php';$connect = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) or die('Could not connect to mysql server.'); mysql_select_db(DB_DATABASE, $connect) or die('Could not select database.');?><?phpecho '';//定义条件sql$CateId = get_CateId_by_UId( $UId );$tiaojian = empty($_POST["tiaojian"])?'u_name':$_POST["tiaojian"];$neirong = empty($_POST["keywords"])?"":$_POST["keywords"];$CateId2 = empty($_POST["CateId2"])?'CateId':$_POST["CateId2"];$orderField = empty($_POST["orderField"])?"id":$_POST["orderField"];$query = mysql_query("select * from users");$totalCount = mysql_num_rows($query);$pageNumShown=10;$_POST["pageNum"]!=""?$pageNum=$_POST["pageNum"]:$pageNum=1;$numPerPage=empty($_POST["numPerPage"])?20:$_POST["numPerPage"];$fup_page=($pageNum-1)*$numPerPage;$sql= "select id,u_id,u_name,last_logintime,last_ip,last_imei,last_phone_number,last_logintype from users where $tiaojian like '%$neirong%' order by $orderField {$orderDirection} limit {$fup_page},{$numPerPage}";$result = mysql_query($sql);?>
- 添加项目
用户名 | 名称 | 最后登录时间 | 最后登录IP | IMEI码 | 登录电话号码 | 登录类型 | 删除 |
---|---|---|---|---|---|---|---|
{$row[1]} | "; echo "{$row[2]} | "; echo "{$row[3]} | "; echo "{$row[4]} | "; echo "{$row[5]} | "; echo "{$row[6]} | "; echo "[删除] | "; echo' |
回复讨论(解决方案)
又是自已解决。。
怎么解决的?
可否给源码参考下?
PHP+DWZ?
我们用的是PHP+