[ic] [loop-next] question

Stefan Hornburg interchange-users@icdevgroup.org
Mon May 19 10:34:01 2003


On Mon, 19 May 2003 16:09:23 +0200
"Xavier GILLET" <xavier.gillet.perso@wanadoo.fr> wrote:

> Hi list,
> 
> I have a problem with this code.
> The loop return 4 results without the [loop-next] tag. But one is not 'En
> ligne ' (on line) so I want to remove it.
> When I use this code, I have no more results returned.
> I really do not understand why....
> 
> [loop search="
>  fi=ma_selection
>  se=[data session username]
>  sf=user
>  se=1
>  sf=actif
>  co=yes
>  tf=heure
>  to=r"]
>     [seti table][loop-data ma_selection dbase][/seti]
>     [seti annonce_ref][loop-data ma_selection annonce_ref][/seti]
>     [tmp tt][data table="[scratch table]" column=actual_status key="[scratch
> annonce_ref]"][/tmp]
>     [if scratch tt ne 'En ligne']
>     [loop-next]1[/loop-next]
>     [/if]
> 
> ************html code here to display results ************
> 
> [/loop]

That is wrong. The loop tags are evaluated first, so your [if] is useless.
You need to put the code into [loop-next]. 

Ciao
	Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team