我有最简单的脚本来将两个查询加载到TCPDF pdf文件中。
如代码所示,它会抛出以下错误:
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\gf3dataservices\tcpdf_5_9_207\tcpdf_table_1.1.0\tcpdf_table\xxxtemp1.php on line 48
TCPDF ERROR: Some data has already been output, can't send PDF file
错误在线
while($row=mysql_fetch_array($new2))
我可以删除// First Query and Output部分,它将工作并输出第二个查询 我可以删除//第二个查询和输出部分,它将工作并输出第一个查询
然而,我不能把它们都留在 - 它只是不会工作 - 让我疯了
<?php
require_once ('connection.php');
//First Query and Output
$result = mysql_query("CALL C01_Client_Summary_ByAccount(1, '2012-02-27', '2013-03-29');");
while($row=mysql_fetch_array($result))
{
echo $row['CommisionPercentage'];
}
//END First Query and Output
//Second Query and Output
$new2 = mysql_query("CALL C01_Client_Summary_ByBetType(1, '2012-02-27', '2013-03-29');");
while($row=mysql_fetch_array($new2))
{
echo $row['Turnover'];
}
//END Second Query and Output
?>