Php 如何限制word中的数据数量
我正在将数据从php页面导出到word,在那里,我得到每个页面中的“n”个数据。。。。 如何设置word页面可以包含的最大数据数,,,, 我只需要在一个页面中包含20个数据 这是我用来将数据导出到word的编码 在mysql_table.php中,将生成pdf文档的表Php 如何限制word中的数据数量,php,codeigniter,Php,Codeigniter,我正在将数据从php页面导出到word,在那里,我得到每个页面中的“n”个数据。。。。 如何设置word页面可以包含的最大数据数,,,, 我只需要在一个页面中包含20个数据 这是我用来将数据导出到word的编码 在mysql_table.php中,将生成pdf文档的表 <?php require('mysql_table.php'); class PDF extends PDF_MySQL_Table { function Header() { //Title $this
<?php
require('mysql_table.php');
class PDF extends PDF_MySQL_Table
{
function Header()
{
//Title
$this->SetFont('Arial','',18);
$this->Cell(0,6,'Country details',0,1,'C');
$this->Ln(10);
parent::Header();
}
}
//Connect to database
mysql_connect('localhost','root','');
mysql_select_db('cms');
$pdf=new PDF();
$pdf->AddPage();
//First table: put all columns automatically
$pdf->Table("SELECT
(SELECT COUNT(*) FROM tblentercountry t2 WHERE t2.dbName <= t1.dbName and dbIsDelete='0')
AS SLNO ,dbName as Namee,t3.dbCountry as Country,t4.dbState as State,t5.dbTown as Town
FROM tblentercountry t1
join tablecountry as t3,
tablestate as t4,
tabletown as t5
where t1.dbIsDelete='0'
and t1.dbCountryId=t3.dbCountryId
and t1.dbStateId=t4.dbStateId
and t1.dbTownId=t5.dbTownId
order by dbName");
$pdf->AddPage();
//Second table: specify 3 columns
$pdf->AddCol('rank',20,'','C');
$pdf->AddCol('name',20,'tablecountry');
$pdf->AddCol('pop',20,'Pop (2001)','R');
$prop=array('HeaderColor'=>array(255,150,100),
'color1'=>array(210,245,255),
'color2'=>array(255,255,210),
'padding'=>2);
//$pdf->Table('select dbCountry,dbCountryId from tablecountry limit 0,10',$prop);
$pdf->Output();
?>
限制
嗯??也许吧
我不明白这个问题。你说word页面中的数据是什么意思?数据是SLno name country State Town 1 udaya India tamil nadu Kovai 2 sarathi aindia tamil nadu Kovai现在我在导出的word文档中得到了60个这样的数据,但我希望在一个页面中只显示其中的20个其余数据必须显示在下一页中page@Gordon你现在明白我的意思了吗?没人能理解你的要求。对不起。否:(我看到正在创建一个PDF文件和一个SQL查询。没有关于文字中的数据可能是什么的线索。