0
I have this function that returns the data to 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);
}
Until then, everything works perfectly. However, I need to add to this same return, another listing, which will compose the json.
That 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?
The returns are different ? of each function I say ...
– novic
Are the same, title, start and end
– Sr. André Baill
They’re different from what I saw from one look
– novic
Yes, the table fields are different, but the return I need is equal.
– Sr. André Baill