Php export non-garbled and non-disordered query. please try again. help me. The first figure above is exported, and the second figure is the actual data of the database, careful friends will find that the last three digits of the exported graph are all 0. in this case, please kindly advise the code as follows: & nbsp; & lt ;? Phpdefine (NOROBOT, & nbsp; true); define (CURSCRIPT, & nbsp; charge)
The first figure above shows the exported data, and the second figure shows the actual data in the database. when you are careful, you will find that all three of the exported images have changed to 0.
Please kindly advise
The code is as follows:
Define ('nobot ', true );
Define ('curscript', 'charge ');
Require_once './include/common. inc. php ';
Header ("Content-type: application/vnd. ms-excel; charset = utf-8 ");
Header ("Content-Disposition: attachment?filename=recharge card .xls ");
$ Page = $ page? : 1;
$ Results = array ();
$ Condition = '';
Echo "phone number charged". "\ t ";
Echo "rechargeable card serial number". "\ t ";
Echo "recharge amount". "\ t ";
Echo "actual charge quota". "\ t ";
Echo "recharge time". "\ t ";
$ Query = $ mysqli-> multi_query ('Call UP_User_GetCardInfo ("'. $ condition. '","'. $ page. '"," 900000 ")' or die ($ mysqli-> error );
$ Query = $ mysqli-> store_result ();
While ($ record = mysqli_fetch_array ($ query, MYSQLI_BOTH )){
$ Phone = $ record ['phone'];
$ Cardid = $ record ['cardid'];
$ Charge = $ record ['charge'];
$ Achieve = $ record ['achieve '];
$ Chgdate = $ record ['usedate'];
Echo "\ n ";
Echo $ phone. "\ t ";
Echo $ cardid. "\ t ";
Echo $ charge. "\ t ";
Echo $ achieve. "\ t ";
Echo $ chgdate. "\ t ";
}
If (is_object ($ query) $ query-> free_result ();
$ Mysqli-> next_result ();
?>
------ Solution --------------------
"'$ Cardid \ t ";
There is a single quotation mark
Yes, you may not be able to see the word clearly if it is too small.