<?php
    defined('BASEPATH') OR exit('No direct script access allowed');
    
    class WorkshopRegistrationWithBookingModel extends CI_Model 
    {
       public function insertWorkshopRegistrationWithBooking($prop)
        {
            return $this->db->insert('tblbooking', $prop);
        }
        
        function getWorkshopRegistrationWithBooking($prop)
        {
            $this->db->where('bookingID', $prop);
            $this->db->select("*");
            $query=$this->db->get('tblbooking');
            return $query->result_array();
		}
		
		function getWorkshopRegistrationWithBookingOnParticipantID($prop)
        {
            $this->db->where('participantID', $prop);
            $this->db->select("*");
            $query=$this->db->get('tblbooking');
            return $query->result_array();
		}
		
		function getWorkshopRegistrationWithBookings()
        {
            $this->db->order_by('bookingID', 'ASC');
            $this->db->select("*");
            $this->db->from("tblbooking");
            $query=$this->db->get();
            return $query->result_array();
        }
        
        function getParticipant($prop)
        {
            $this->db->where('participantID', $prop);
            $this->db->where('payment', '1');
            $this->db->select("*");
            $query=$this->db->get('tblparticipant');
            return $query->result_array();
		}
    }