
24/01/2014, 22:36
|
| | Fecha de Ingreso: mayo-2009
Mensajes: 166
Antigüedad: 15 años, 10 meses Puntos: 2 | |
Respuesta: llamar a dos objetos Perdon aqui lo encontre:
function getAllUno($limit = 100, $offset = 0, $rcId=0)
{
$this->db->order_by('reCreationDate','desc');
$this->db->where('rcId', $rcId);
$query = $this->db->get('reports', $limit, $offset);
if ($query->num_rows()){
foreach ($query->result() as $row){
$report = new Report();
$report->id = $row->reId;
$report->name = $row->reName;
$report->path = $row->rePath;
$report->is_available = $row->reIsAvailable;
$report->rep_cat_id = $row->rcId;
$report->creation_date = $row->reCreationDate;
$report->re_is_used = $row->reIsUsed;
$this->db->where('rcId', $row->rcId);
$query2 = $this->db->get('reports_categories');
if($row2 = $query2->row()){
$report->category = $row2->rcName;
$report->type = $row2->rcType;
}
$reports[] = $report;
}
return $reports;
}
else return NULL;
}
Lo que necesito es que la función getAllUno me llame a todos loe elementos no importa su ID... por ejemplo si yo le pongo
$this->db->where('rcId', 1);
Me llama solo los rcId que tengan valor 1 y asi... |