load->database(); } public function getSalesCustomerByRecordIDCustomerID() { return $this->db->get_where("salescustomer", array("recordID"=>$this->recordID, "customerid"=>$this->customerid)); } public function addSalesCustomer() { $data = array( "recordID" => $this->recordID, "customerid" => $this->customerid ); $success = $this->db->insert("salescustomer", $data); if($success) return array("success"=>$success, "data" => $data); else return array("success"=>$success, "data" => $this->db->error()); } }