How to realize real-time data update with jquery php
This article to share with you is about jquery php how to achieve real-time data update, Xiaobian feel quite practical, so share to everyone to learn, I hope you can read this article after some harvest, not much to say, follow Xiaobian to see it.
Operating environment: Windows 7 system, PHP 7.1 version, Dell G3 computer.
How does jquery php achieve real-time data updates?
php+jQuery ajax real-time refresh display data function example
The details are as follows:
Creating a data table: demo
---TABLE STRUCTURE `DEMO`--CREATE TABLE IF NOT EXISTS `DEMO`( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(20) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=5 ;----DATA `DEMO`--INSERT INTO `DEMO` (`id`, `name`) VALUES(1, 'Lei Jun'),(2, ' Ma Huateng'),(3, 'Li Yanhong'),(4, ' Ma Yun');
Server file: demo.php