Welcome Guest, Not a member yet? Register   Sign In
Make array - Query with JOIN
#1

[eluser]VolkS[/eluser]
hello, sorry for my poor English.

Code:
$query =
$this->db->select('imagenes.*,imagenes.imagen as nimagen, noticias.id_noticia, noticias.estado,noticias.titulo')
  ->from('imagenes')
  ->where('noticias.estado', $estado)
  ->where('imagenes.estado', $estado)
  //->group_by('imagenes.id_noticia')
  ->order_by('imagenes.id_noticia','ASC')
  ->join('noticias','imagenes.id_noticia = noticias.id_noticia','LEFT')
  ->get();

  return $query->result();

how i can make a array?

Example:

Notice 1:
--Image1
--Image2
--Image3

Notice 2:
--Image1
--Image2
--Image3

Thanks!!!


Messages In This Thread
Make array - Query with JOIN - by El Forum - 09-14-2012, 09:29 AM
Make array - Query with JOIN - by El Forum - 09-14-2012, 11:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB