Home » RADICORE development » Framework » Output 5 (Label view)
|
|
|
Re: Output 5 (Label view) [message #7577 is a reply to message #7576] |
Tue, 23 February 2021 04:24   |
AJM
Messages: 2378 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
I do not understand why you say that this pattern will only print one record. When the $object->getData_serial($where) method is called on a table object then it will return the number of records which satisfy the $where clause. If you are storing the quantity of tickets in one record then only returning that one record then your approach is wrong. The call to ->getData_serial() will return the number of records, then subsequent calls to ->fetchRow() will return one record at a time.
[Updated on: Tue, 23 February 2021 04:25] Report message to a moderator
|
|
|
|
|
|
Re: Output 5 (Label view) [message #7581 is a reply to message #7580] |
Thu, 25 February 2021 05:59   |
AJM
Messages: 2378 Registered: April 2006 Location: Surrey, UK
|
Senior Member |
|
|
Sorry, I did mean _cm_post_fetchRow(). You do not have to call ->fetchRow() yourself as that is done automatically within the PDF object when the following line of code in std.output5.inc is called:
$document = $pdf->outputPDF_LabelView($resource);
This will keep calling ->fetchRow() and ->_cm_post_fetchRow() until it returns FALSE which signifies EOF.
I have just checked the code and seen that after retrieving the first record with the first call to ->fetchRow() you need to set $this->skip_getdata=TRUE so that it skips subsequent database reads and goes straight into _cm_post_fetchRow().
[Updated on: Thu, 25 February 2021 06:00] Report message to a moderator
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Mon Apr 07 09:34:54 EDT 2025
Total time taken to generate the page: 0.01406 seconds
|