19 lines
575 B
PHP
19 lines
575 B
PHP
<?php
|
|
include "db.php";
|
|
|
|
$onum = 134075;
|
|
|
|
$query = "select sum(hloi.qty * hlmp.supplier_product_qty * (sp.package_cost / sp.package_qty)) as cost " .
|
|
"from hotlunch_order_items as hloi, hotlunch_menu_products as hlmp, supplier_products as sp " .
|
|
"where hloi.school_num = hlmp.school_num " .
|
|
"and hloi.school_num = sp.school_num " .
|
|
"and hloi.order_num = $onum " .
|
|
"and hloi.menu_item_num = hlmp.menu_item_num " .
|
|
"and hlmp.supplier_product_num = sp.record_num";
|
|
$cost = db_getVal($query);
|
|
|
|
printf("%12.2f\n",$cost);
|
|
|
|
|
|
?>
|