PHP100 2019-03-27
代码如下:
$handle = mysql_connect("host", "user", "password"); if(!$handle || !(mysql_select_db("databasename", $handle))) exit(); $sql = 'select skype_id from skype_prize where prize_id = * and sn = ' ' and to_days(update_time) = to_days(now()-1)'; //取出昨天没有充上话费的用户 $result = mysql_query($sql, $handle); if(! $result) dlog("Info",$sql ); //后台打印 while($row = mysql_fetch_row($result)) { $skype_id = $row[0]; $product_id = number; charge_skype(gen_order_id(), $skype_id, $product_id);//调用充值函数 }