I have the querys i want, and i know simple php. But this is far beyond me. And i have no idea how to post information that i have called.
Can somone show me how
A) I can calculate the totals
and
😎 how to echo the results like a table ie.
$query_product $query_model $query_price $query_cost $total_cost $total_price
Also i was wondering does this query allow for multiple results. In other words will the totals work if there is more than one value @oder_id
heres the code.
$customer_number_query = tep_db_query("select customers_id from " . TABLE_ORDERS . " where orders_id = '". tep_db_input(tep_db_prepare_input($HTTP_GET_VARS['order_id'])) . "'");
$query_product = "SELECT product_name FROM orders_products WHERE order_id='$customer_number_query'";
$query_model = "SELECT product_model FROM orders_products WHERE order_id='$customer_number_query'";
$query_price = "SELECT final_price FROM orders_products WHERE order_id='$customer_number_query'";
$query_prod_id = "SELECT products_id FROM orders_products WHERE order_id='$customer_number_query'"; //this is so i can query the next line
$query_cost = "SELECT products_cost FROM products WHERE products_id='$query_prod_id";
$total_cost = "all of the $query_cost added together";
$total_price = "all of the $query_price added together";
Thanks so much for anyone who can help me, this is really important. Thanks again
Scott