I have this function that returns the data for Ajax:
public function get_agenda(){
$this->db->select('prospect_agendamento.age_data_agendado_para as start, prospect.pro_nome as title, prospect.pro_id as id ');
$this->db->where('prospect_agendamento.age_data_agendado_para BETWEEN "'. date('Y-m-d', strtotime($_GET['start'])). '" and "'. date('Y-m-d', strtotime($_GET['end'])).'"');
$this->db->join("prospect", "prospect.pro_id=prospect_agendamento.age_id_prospect");
$retorno = $this->db->get('prospect_agendamento')->result();
echo json_encode($retorno);
}
So far, everything works perfectly. However, I need to add to this same return, another listing, which will compose json.
What would be of this table structure:
The other function I have to group is this:
public function get_agenda_1(){
$this->db->select('tarefa.tar_data_inicial as start, tarefa.tar_data_final as end, tarefa.tar_titulo as title');
$retorno = $this->db->get('tarefa')->result();
echo json_encode($retorno);
}
How can I make a new list?