PHP beginners write small programs that promptly replenish Skype users' phone charges

Source: Internet
Author: User

In fact, there are dozens of items, but because there is a large amount of data to be operated, a small section is added to the end. ProgramYou can process the data that was not processed yesterday as follows: CopyCodeThe Code is 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 the user who did not recharge the phone bill 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 first and continue writing again tomorrow. During this period of time, I am very grateful to Colin for his understanding and help. I know that I have many shortcomings, but I will make some corrections soon. Sorry for the trouble I 've put in some time ago. please believe that I have been improving. for PHP beginners, you are welcome to criticize and guide me.

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.