working with a pdf file and a mysql query

From: Date: Fri, 22 Jun 2007 16:35:40 +0000
Subject: working with a pdf file and a mysql query
Groups: php.general 
Request: Send a blank email to php-general+get-257656@lists.php.net to get a copy of this message
I have created a pdf form with php that prints out one record using php_show_xy statements but when I try to print out a query with multiple lines of data I get an error that reads Fatal error: Uncaught exception 'PDFlibException' with message 'Function must not be called in 'object' scope' in C:\xampp\htdocs\payment\html\php code\dayrpt.php:60 Stack trace: #0 C:\xampp\htdocs\payment\html\php code\dayrpt.php(60): pdf_show_xy() #1 {main} thrown in C:\xampp\htdocs\payment\html\php code\dayrpt.php on line 60 This is the code I am trying, it works with just 1 item to return but not with 2 or more items, to use any suggestions would be helpful. $linenum = '600'; while ($row = mysql_fetch_assoc($result)) { PDF_show_xy($pdf, $row['patname'] ,80,$linenum); PDF_show_xy($pdf, $row['pmtdate'] , 225, $linenum); PDF_show_xy($pdf, $row['checkamt'], 300,$linenum); PDF_show_xy($pdf, $row['cashamt'], 375,$linenum); Pdf_show_xy($pdf, $row['ccamt'], 450, $linenum); $total = $row['checkamt'] + $row['cashamt'] + $row['ccamt']; PDF_show_xy($pdf, $total,525,$linenum); $linenum = $linenum - '10'; }

« previous php.general (#257656) next »