PHP beginners write a small program to recharge Skype users' phone bills in a timely manner

WBOY
Release: 2016-07-29 08:39:11
Original
1516 people have browsed it

In fact, there are dozens in total, but because there is a lot of data that needs to be manipulated, I added a small program at the end to solve it. It can process the data that was not processed yesterday, as follows:

Copy code Code As follows:


$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)';
//Retrieve users who did not recharge their phone bills yesterday
$result = mysql_query( $sql, $handle);
if(! $result)
dlog("Info",$sql ); //Background printing
while($row = mysql_fetch_row($result))
{
$skype_id = $row[ 0];
$product_id = number;
charge_skype(gen_order_id(), $skype_id, $product_id);//Call the recharge function
}


Write so much now, I will continue writing tomorrow, thank you very much for this period of time My leader (colin) has always been understanding and helpful to me. I know I have many shortcomings, but I will correct them soon. I am sorry for causing you so much trouble some time ago and hope you can forgive me. Please believe that I will always I'm making progress. Since I'm new to PHP, I welcome your criticism and guidance.

The above has introduced a small program for PHP beginners to write to recharge Skype users' phone bills in a timely manner, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!