hi ppl
i have following code
while(list($apellido)=mysql_fetch_array($data1))
{
$data2 = mysql_query("select nombre from usuario where apellido='$apellido' ");
while(list($nombre)=mysql_fetch_array($data2))
{
$tpl->assign("NOMBRE", $nombre);
$tpl->assign("APELLIDO", $apellido);
$tpl->parse(USUARIOS, ".listado");
$tpl->clear_tpl("listado");
}
$tpl->parse(TODO, ".listado_total");
$tpl->clear_tpl("listado_total");
}
in the first while the code takes the users by last name
the 1st name it gets is GARCIA
then, in the 2nd while takes all the users with the last name = GARCIA
the list i get is
garcia walter
garcia quique
garcia ramon
..........
until here is perfect
here comes the problem.
when the browser shows me the result, it should show only the last search but it keeps giving me the last 1 I made and it shows it and in the second too, and so...
i put to free memory after each search but it keeps showing it...
the browser shows me this
(1st pass)
garcia walter
garcia quique
garcia ramon
..........
(2nd pass)
garcia walter
garcia quique
garcia ramon
..........
jimenez pepe
jimenes carlito
..............
how could i solve this?
what is the cause of this trouble?
i'm using the last version of fasttemplates...
thanks alot in advance.