hi, guys
i have this Sql with doctrine
on my controller
public function executeIndex(sfWebRequest $request)
{
$this->mr_album_imagen_list =
Doctrine::getTable('MrAlbumImagen')->getImagenesAlbum($this->getUser()->getAttribute('id_usuario'));
$this->forward404Unless($this->mr_album_imagen_list);
}
on my model
public function getImagenesAlbum($id_usuario){
$q = Doctrine_Query::create()
->select('ma.descripcion, mai.nombre as foto, mai.descripcion as
fdescripcion, mai.id_imagen as idimagen')
->from('MrAlbum ma')
->innerJoin('ma.MrAlbumImagen mai')
->innerJoin('ma.MrUsuario mu')
->where('mu.id_usuario = ?', $id_usuario);
print_r($q->getSql());
return $q->execute();
}
and print_r: return this SQL
SELECT m.id_album AS m__id_album, m.descripcion AS m__descripcion,
m2.nombre AS m2__0, m2.descripcion AS m2__1, m2.id_imagen AS m2__2
FROM mr_album m INNER JOIN mr_album_imagen m2 ON m.id_album =
m2.album_id INNER JOIN mr_usuario m3 ON m.usuario_id = m3.id_usuario
WHERE m3.id_usuario = ?
the parameter is for example 3 or X, when i execute this sql directly
on my DB, this return 10 rows, but when i try display in my template
this return only 3 rows.
if a run with the tool for sql
6 Cuarto Album; "e86a3e7835d70d256fe9190d44ff1108f87a760e.jpg"; "en
el 6 aereopuerto de guadalajara."; 2
6 Cuarto Album; "85a016d1ce8cc8804bcb18bfa0710fdc0486d664.jpg"; "la
catedral"; 3
6 Cuarto Album; "ad9dfcfddc1bc8f621b5834b056fc9acf1ea697e.jpg"; "la
fuente en el hotel"; 4
5 Tercer Album; "c1255a9376ed02cc604d39d3652ba93bc1f9f3bc.jpg";
"boleto de avion ahora en la 5"; 5
5 Tercer Album; "a99d518dcc8589fc675e3268d590dd8d9df1f380.jpg"; "la
catedral en el album 5"; 6
6 Cuarto Album; "2ca45a0f7c4729d205f11a6b8af78ed05a82369f.jpg";
"adentro de una iglecia en ela lbum 6"; 7
4 Segundo Album; "5666319836020d4c6e361a909f5b51be7f961d1b.jpg";
"ahora en el cuatro"; 8
4 Segundo Album; "36e816468f6da0c375a40ad56db7aba5659a5412.jpg";
"ahora en el cuatro"; 9
4 Segundo Album; "48faf416a1a24e541a4caef941bc00032debb9cc.jpg";
"xx"; 10
on my template
foreach ($mr_album_imagen_list as $mr_album_imagen):?>
<tr>
<td><a href="<?php echo
url_for('albumimagen/show?id_imagen='.$mr_album_imagen->getIdimagen())
?>"><?php echo $mr_album_imagen->getIdimagen() ?></a></td>
<td><?php echo $mr_album_imagen->getDescripcion()?></td>
</tr>
<?php endforeach;?>
here only display 3
2 Cuarto Album e86a3e7835d70d256fe9190d44ff1108f87a760e.jpg en el 6
aereopuerto de guadalajara.
5 Tercer Album c1255a9376ed02cc604d39d3652ba93bc1f9f3bc.jpg boleto
de avion ahora en la 5
8 Segundo Album 5666319836020d4c6e361a909f5b51be7f961d1b.jpg ahora
en el cuatro
only display the firsts
your have a idea?
sorry for the english
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---