regarding in query from the model, i got already the values and store it from a variable, now i want it to be stored from a data array for further use, how can i do this, i am in controller from codeigniter.
Here is my controller full code:
public function move_data($queue_id) {
$data = array();
$user = array('user_id' => $this->session->userdata['logged_in']['user_id']);
$getqueuedata = $this->Clinic_model->queue_data($queue_id,$user);
//echo json_encode($getqueuedata);
$data = array (
'queue_id' => $getqueuedata['queue_id'],
'user_id' => $getqueuedata['user_id'],
'clinic_id' => $getqueuedata['clinic_id'],
'order_num' => $getqueuedata['order_num'],
'patient_id' => $getqueuedata['patient_id'],
);
}
when i //echo json_encode($getqueuedata); uncomment this line, and comment the array storing, i will have this:
[{"user_id":"102","clinic_id":"2","order_num":"1","patient_id":"7","status":"2","time_sched":null,"queue_id":"1"}]
in my full code, i got error, i dont know how to store the values of my query from array.