@@ -6,7 +6,8 @@ class Order_model extends CI_Model {
}
publicfunctiongetOrders(){
$this->db->select("ORD.format_order_id,ORD.quantity,ORD.amount,ORD.status,PRD.product_name,TRIM(CONCAT(CUST.first_name,' ' ,IFNULL(CUST.last_name,''))) as customer_name,ORD.order_id");
$this->db->select("ORD.*,PRD.product_name,
TRIM(CONCAT(CUST.first_name,' ',IFNULL(CUST.last_name,''))) as customer_name");
$this->db->from('orders AS ORD');
$this->db->join('products AS PRD','PRD.product_id = ORD.product_id');
$this->db->join('customers AS CUST','CUST.customer_id = ORD.customer_id');
...
...
@@ -20,7 +21,8 @@ class Order_model extends CI_Model {
if($order_id==''){
return0;
}
$result=$this->db->query("SELECT ORD.*,PRD.product_name,PRD.short_description,PRDB.brand_name,TRIM(CONCAT(CUST.first_name,' ' ,IFNULL(CUST.last_name,''))) as customer_name,