欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

请教DWZ PHP网站后台换页问题

程序员文章站 2024-02-11 23:02:28
...
本帖最后由 gdljw 于 2013-03-30 11:45:59 编辑

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}";

就换不了页了,请问要怎设置?


';//定义条件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);?>
'; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
用户名 名称 最后登录时间 最后登录IP IMEI码 登录电话号码 登录类型 删除
{$row[1]}{$row[2]}{$row[3]}{$row[4]}{$row[5]}{$row[6]}[删除] "; echo''; $i++; } ?>
显示 条,共
'; if ($_GET["command"] == "del") { if (DB::delUser($_GET["uid"])) { echo ""; }else echo "";}if ($_GET["command"] == "delgroup") { if (DB::deleteGroup($_GET["gid"])) { echo ""; }else echo "";} ?>