$strSQL = "SELECT DISTINCT
tb_order.*, tb_product.*, tb_customer.*, tb_receipt.*, tb_order_details.*
FROM
tb_product , tb_customer , tb_receipt , tb_order_details , tb_order
WHERE
tb_order_details.Order_ID = tb_order.Order_ID AND
tb_order_details.Pd_ID = tb_product.Pd_ID AND
tb_order.Cus_ID = tb_customer.Cus_ID AND
tb_receipt.Order_ID = tb_order.Order_ID AND
Order_Deliverydate between '".$_POST['startdate0']."' and '".$_POST['startdate1']."' order by Order_Date ASC";
$strSQL = "SELECT DISTINCT
tb_order.*, tb_product.*, tb_customer.*, tb_receipt.*, tb_order_details.*
FROM
tb_product , tb_customer , tb_receipt , tb_order_details , tb_order
WHERE
tb_order_details.Order_ID = tb_order.Order_ID AND
tb_order_details.Pd_ID = tb_product.Pd_ID AND
tb_order.Cus_ID = tb_customer.Cus_ID AND
tb_receipt.Order_ID = tb_order.Order_ID AND
Order_Deliverydate between '".$_POST['startdate0']."' and '".$_POST['startdate1']."' order by Order_Date ASC , Order_ID ASC";