Prompt me, younger brother <phpwhile ($ myrow = mysql_fetch_array ($ result) {Here error, but younger brother I don't know what is wrong here? Answers from experts

Source: Internet
Author: User
Prompt me & lt ;? Phpwhile ($ myrowmysql_fetch_array ($ result) {an error occurred, but I don't know what is wrong here? How can this problem be solved? & Lt; html & nbsp; xmlnswww. w3.org5oxhtml & gt; & lt; head & gt; & lt; meta & nbsp; http-equivConte prompt me


Untitled Document




Include ("conn/conn. php"); // contains the conn. php file
If (isset ($ _ GET ['Page']) {
$ Page = $ _ GET ['Page'];
} Else {
$ Page = 1;
}?>
If ($ page ){
$ Page_size = 4; // Four records are displayed on each page
$ Query = "select * from tb_news"; // defines the query statement.
$ Result = mysql_query ($ query); // execute the query operation
$ Message_count = mysql_num_rows ($ result); // obtain the total number of queries.
$ Page_count = ceil ($ message_count/$ page_size); // obtain the total number of pages
$ Offset = ($ page-1) * $ page_size;
$ Query = "select * from tb_user where id order by id desc limit $ offset, $ page_size ";
$ Result = mysql_query ($ query );
}
?>


Php + mysql

Share:


------ Solution --------------------
$ Query = "select * from tb_user where id order by id desc limit $ offset, $ page_size"; // Is there a problem in the highlighted red?

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.