I've searched the forum to no avail regarding my issue. Hopefully someone can point me in the right direction.
PHP Runner 9.8 (Have 10 but not yet using)
I have a inventory table with just under 40,000 records. I display 100 records per page and all fields are searchable (only 5 fields in the table!).
I have setup a Make Inquiry Button and used the following code from the manual which works when all selected records are on the first page. If user selects some records from page 1 and then goes to page 2 or more and selects more records (which will often happen). Only records selected on page 1 get emailed when Make Inquiry button clicked.
Is this a bug or is there something I am missing.
Code for Button - Server
$email_msg = "";
//$email_msg.= "List of records selected";
$i=1;
while($data = $button->getNextSelectedRecord())
{
$email_msg.= "Number: ".($i++)."\r\n";
$email_msg.= "Case Number: ".$data["Case_Number"]."\r\n";
$email_msg.= "Description: ".$data["Description"]."\r\n";
$email_msg.= "\r\n";
//$email_msg.= "Database record ID: ".$data["ID"]."\r\n";
$email_msg.= "\r\n";
}
//send email
$email = "*********@googlemail.com";
$subject = "List of Interest";
runner_mail(array('to' => $email, 'bcc' => '*******@*******', 'subject' => $subject, 'body' => $email_msg));
PHP Runner 9.8 (Have 10 but not yet using)
I have a inventory table with just under 40,000 records. I display 100 records per page and all fields are searchable (only 5 fields in the table!).
I have setup a Make Inquiry Button and used the following code from the manual which works when all selected records are on the first page. If user selects some records from page 1 and then goes to page 2 or more and selects more records (which will often happen). Only records selected on page 1 get emailed when Make Inquiry button clicked.
Is this a bug or is there something I am missing.
Code for Button - Server
$email_msg = "";
//$email_msg.= "List of records selected";
$i=1;
while($data = $button->getNextSelectedRecord())
{
$email_msg.= "Number: ".($i++)."\r\n";
$email_msg.= "Case Number: ".$data["Case_Number"]."\r\n";
$email_msg.= "Description: ".$data["Description"]."\r\n";
$email_msg.= "\r\n";
//$email_msg.= "Database record ID: ".$data["ID"]."\r\n";
$email_msg.= "\r\n";
}
//send email
$email = "*********@googlemail.com";
$subject = "List of Interest";
runner_mail(array('to' => $email, 'bcc' => '*******@*******', 'subject' => $subject, 'body' => $email_msg));