Some time ago, an activity went live and there was a problem that a small number of skype users did not charge their phone bills. today I went to the database (mysql) for a query, which shocked me. in this way, I may be overwhelmed by the possibility of Skype.
In fact, there are dozens of items, but because there is a large amount of data to be operated, a small program is added to solve the problem. The data that was not processed yesterday can be processed, as shown below:
The 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.