How to use PHP to process database data to return data to the client and display the current status _ php instance

Source: Internet
Author: User
This article introduces how to use php to process a large amount of data. each time a piece of data is processed, the current status of the client is returned, if you are interested in PHP processing database data and returning to the client and displaying the relevant knowledge of the current status, learn how php processes a large amount of data.

Similar to dedecms for generating static pages

Idea:

1. the client sends a request
2. the server receives the request and starts to count the data volume to be processed.
3. sort the data to be processed according to certain rules and send them to the server processing end.
4. the server processing end processes the first data and sends the processing result to the client after some processing.
5. when the client receives the result, it automatically displays the result and sends it to the server.
6. the server receives the processing result and forwards it to the server processing end.
7. the processing end continues to process the results...
8. loop through steps 4-7 until the processing is completed

Experiment process:

1. create databases and tables

create databases handle;create table user(id int unsigned not null auto_increment primary key,name varchar(8),sex tinyint(1) default '1',score int not null,state tinyint(1)); 

2. add data to the table (not for example)

3.create the index.html client, a. php server 1, B. php Server 2

Index.html:

 ClientStart request

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.