This topic is locked

master/detail email

2/11/2016 8:22:51 AM
PHPRunner General questions
S
smireb author

I am trying to send an email with both the master (order) and detail (details)that both contain the(order_id)and I am getting errors.
global $dal;

$dal_TableName = $dal->Table("order");

$body="";

foreach(@$keys as $keyblock){

$arr=split("&",refine($keyblock["order_id"]));

if(count($arr)<1)

continue;

$arr2=array();

$arr2["order_id"]=urldecode(@$arr[0]);

$where = KeyWhere($arr2);

$rstmp = $dal_TableName->Query($where,"");

$datatmp=db_fetch_array($rstmp );
$body .= $datatmp['order_id'] ."\n";

$body .= $datatmp['pieces']."\n";

}
// send the email

$email="sample@test.com";

$subject="Order Complete";

$arr = runner_mail(array('to' => $email, 'subject' => $subject,

'body' => $body));

Sergey Kornilov admin 2/12/2016

Where do you put this code?

What's the exact error message?

S
smireb author 2/12/2016



Where do you put this code?

What's the exact error message?



With a button on before process event.

Sergey Kornilov admin 2/12/2016

Sorry, this just doesn't make any sense to me.