PHP Export non-garbled non-random sequence of wonderful problems ask the big God to help my brother
The first diagram above is the export, the second is the actual data of the database, the careful buddies found that the exported figure three all changed to 0, this god horse situation AH
Ask the great God for guidance
The code is as follows:
Define (' Norobot ', 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= Prepaid card. xls");
$page = $page?: 1;
$results = Array ();
$condition = ";
echo "Prepaid phone number". " \ t ";
echo "Prepaid card serial number". " \ t ";
echo "Recharge amount". " \ t ";
echo "Real charge amount". " \ 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
is also thinking: the word is too small may not see clearly