douang1243 2010-03-30 12:10
浏览 23
已采纳

如何限制word中的数据量

I am exporting data from php page to word,, there i get 'n' number of datas in each page .... How to set the maximum number of data that a word page can contain ,,,, I want only 20 datas in a single page

This is the coding i use to export the data to word

In mysql_table.php the table for the pdf document is be generated

<?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();
?>

How to limit the number of datas in a page

  • 写回答

1条回答 默认 最新

  • dongtong1226 2010-03-30 19:59
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算