|
Show list of all orders placed by this customer on Order Edit
page.
Use (Insert PHP code snippet) button
to add this event on the Visual
Editor page.
Note: Change
the values listed in red to
match your specific needs.
|
global $dal;
$tblOrders = $dal->Table("Orders");
$rs
= $tblOrders->Query("OrderID=".$_REQUEST["editid1"],"");
$data
= db_fetch_array($rs);
$CustomerID = $data["CustomerID"];
echo
"Orders placed by "
.$CustomerID.
"<br>";
$rsOrders = $tblOrders->Query("customerid='".$CustomerID."'","");
while($data=db_fetch_array($rsOrders))
{
echo
"<a target=_blank
href=Orders_edit.php?editid1=".$data["OrderID"].
">". $data["OrderID"]."</a> ".$data["OrderDate"]."<br>";
}
|
For more information about using Data Access Layer (DAL), see
Data Access Layer.
|