Php beginners need to write small programs that promptly replenish skype users' phone charges. In fact, there are dozens of items, but because there is a lot of data to be operated, a small program is added to solve the problem. you can process the data that was not processed yesterday, as shown in the following code: The copy code is actually combined with dozens of data, but because the data to be operated is large, add a small program to solve the problem. data that was not processed yesterday can be processed as follows:
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.
:...