I would like to ask questions about page change in the background of the DWZPHP website-php Tutorial

Source: Internet
Author: User
Tags php website
Ask the DWZPHP website back-end page change question this post was last edited by gdljw in 2013-03-3011: 45: 59 and finally engaged in PHP + DWZ as the website background. find this code on the Internet and try again, however, I want to add a condition caidselect & nbsp; id, u_id, u_name, last_logintim to ask the DWZ PHP website background page change question.

This post was last edited by gdljw at 11:45:59

Finally, let's use PHP + DWZ as the website background. find this code on the internet. if the trial is normal, you can change the page. However, I want to add the condition caidid = caidid pagination, directly at $ 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 }";

The page cannot be changed. how can I set it?


 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 .');
?>

Echo '';
// Define a conditional SQL statement

$ 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 );
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.