I'm having a problem with Fast Template duplicating the content.
Here's the code, hoping someone may be of help, thanks!
while(list($las t_name)=mysql_f etch_array($dat a1))
{
$data2 = mysql_query("se lect first_name from user where
last_name='$las t_name' ");
while(list($fir st_name)=mysql_ fetch_array($da ta2))
{
$tpl->assign("FIRST_ NAME", $first_name);
$tpl->assign("LAST_N AME", $last_name);
$tpl->parse(USERS, ".list");
$tpl->clear_tpl("lis t");
}
$tpl->parse(VIEW_ALL , ".list_all" );
$tpl->clear_tpl("lis t_all");
}
now when the first "while" passes to the next last name, for example
"jimenez, the second "whie" looks for users that have the last name
of jimenez.
now heres the problem, when it shows the result in the browser it
should show nothing more than the last search, however it also shows
the search before that one plus a copy of it!!! and so on, it carries
on the searches!!
besides it has a command that when it goes through once it clears the
memory or that variable so it wont carry it on to the next with option
clear_tpl, but it shows it anyways!!
(what shows in the browser)
(1 gone through)
garcia walter
garcia quique
garcia ramon
...........
(2 gone through)
garcia walter
garcia quique
garcia ramon
...........
jimenez pepe
jimenes carlito
...............
Thanks, I hope someone can see what I'm doing wrong and help me,
thanks so much!
nailgunner@yaho o.com
Here's the code, hoping someone may be of help, thanks!
while(list($las t_name)=mysql_f etch_array($dat a1))
{
$data2 = mysql_query("se lect first_name from user where
last_name='$las t_name' ");
while(list($fir st_name)=mysql_ fetch_array($da ta2))
{
$tpl->assign("FIRST_ NAME", $first_name);
$tpl->assign("LAST_N AME", $last_name);
$tpl->parse(USERS, ".list");
$tpl->clear_tpl("lis t");
}
$tpl->parse(VIEW_ALL , ".list_all" );
$tpl->clear_tpl("lis t_all");
}
now when the first "while" passes to the next last name, for example
"jimenez, the second "whie" looks for users that have the last name
of jimenez.
now heres the problem, when it shows the result in the browser it
should show nothing more than the last search, however it also shows
the search before that one plus a copy of it!!! and so on, it carries
on the searches!!
besides it has a command that when it goes through once it clears the
memory or that variable so it wont carry it on to the next with option
clear_tpl, but it shows it anyways!!
(what shows in the browser)
(1 gone through)
garcia walter
garcia quique
garcia ramon
...........
(2 gone through)
garcia walter
garcia quique
garcia ramon
...........
jimenez pepe
jimenes carlito
...............
Thanks, I hope someone can see what I'm doing wrong and help me,
thanks so much!
nailgunner@yaho o.com