If you can't sort it on the database side using SQL, sort it on the template
side using nsort().
something like this:
[% FOREACH x = somehash.somearray.nsort('numeric_key_to_sort_by') %]
[% x.other_key_for_display %]
[% END %]
-Derrek
On Monday 08 July 2002 04:30 pm, Dean Sacramone wrote:
> hey all,
>
> I have a database as follows.
>
> +------+------------------------------------+--------+
>
> | rank | image_name | active |
>
> +------+------------------------------------+--------+
>
> | 1 | /tmimages/venue/extra/la1257xe.gif | y |
> | 2 | /tmimages/venue/extra/la1257xd.gif | y |
> | 3 | /tmimages/venue/extra/la1257xa.gif | y |
> | 4 | /tmimages/venue/extra/la1257xb.gif | y |
> | 5 | /tmimages/venue/extra/la1257xc.gif | y |
>
> +------+------------------------------------+--------+
>
>
> I want to list the image paths with "image_name"...but
>
> I want to list them in order of RANK....in other
> words,
> I don't want to reiterate thru the "image_name"...what
> I want to do is reiterate thru RANK and order them
> that way, but use the contents of 'image_name"...
>
> I guess this would be the sequel statemetn..
> select rank,image_name,active from venue_images where
> venue_id = 73985 and active = 'y' order by rank;
>
> any help?/..thanks,
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
> http://www.template-toolkit.org/mailman/listinfo/templates