[ic] how to list areas ?

Mike Heins interchange-users@lists.akopia.com
Mon Jul 9 16:54:00 2001


Quoting Eduardo Dominguez (edmz@yahoo.com):
> I am trying to print the area names like so:
> [loop
>   prefix=box
>   search="
>     fi=area
>     st=db
>     tf=sort
>     ac=0
>     co=yes
>     sf=name
>       op=rm
>       se=*
> "]
> 
> But I cant print the name. I have tried [box-field name] and other different 
> combinatios but so far I havent been able to do it. I just want to output
> the list, thats all.

The easiest way to do that only is:

[query list=1 sql="SELECT DISTINCT name FROM area ORDER BY name"]
	[sql-code]
[/query]

This works for all Interchange db types, but will be fast when
possible. If you have a large database in SQL, you would gain
lots of speed over the [loop search=""]. In GDBM, essentially
it is translated to a search.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

Unix version of an Outlook-style virus:
It works on the honor system. Please forward this message to everyone
you know, and delete a bunch of your files at random.