Blogger Information
Blog 263
fans 3
comment 2
visits 113339
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
每间隔一分钟检查数据库订单,有新订单提取新订单.
福哥的博客
Original
1355 people have browsed it
#check.php
<?php
#订单个数
$sum = 0;
 
while(1){
#查询语句
$sql = "...";
mysql_query($sql);
$res = mysql_fetch_array();
...
#获取查询结果的长度
$sumTmp = count($res);
 
#比较长度大小
if($sumTmp > $sum){
   //当前长度大于sum时,提取最后sumTmp一条记录
}
$sum = $sumTmp;
 
#间隔60秒
sleep(60);
}//end while
?>

#外部执行该脚本
exec("/usr/php5/bin/php check.php");

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post