Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Numerical Field Sorting

Quote Reply
Numerical Field Sorting
I am working on setting up link properties on our web site and was wondering if someone would be able to help me out. There are going to be couple of numerical fields like "cost" & "filesize". Now I wish to allow end users an ability, where they can sort listings based on cost (high to low & low to high using gt & lt) or filesize (how to low & low to high using gt & lt).

Now my question is, what would be the Column Type required, that will allow me to give user the sorting option.

Thank you for the help.

Vishal
-------------------------------------------------------

Last edited by:

SWDevil.Com: Mar 3, 2007, 9:17 PM
Quote Reply
Re: [SWDevil.Com] Numerical Field Sorting In reply to
~~ anyone ??? ~~

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Numerical Field Sorting In reply to
Use a numeric column type (INT, DECIMAL, FLOAT, etc).

Adrian
Quote Reply
Re: [SWDevil.Com] Numerical Field Sorting In reply to
Hi,

As Adrian said, you will need to use FLOAT, INT or DECIMAL.

You can then use stuff like:

page.cgi?so=Field_To_Sort;

..or in search.cgi;

search.cgi?query=*;gt-Field_Name=1234 (for "greater than)... etc

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Numerical Field Sorting In reply to
Thank you Adrian & Andy, that is exactly what I was looking for.

Quote:
search.cgi?query=*;gt-Field_Name=1234 (for "greater than)... etc

Andy to the rescue again, this url string will be one of the main feature of our site now.

P.S.. Hey Andy, been a long time see u around, hope you are doing good and everything at your end is great.

Vishal
-------------------------------------------------------
Quote Reply
Re: [SWDevil.Com] Numerical Field Sorting In reply to
Hi,

Glad to have been a help :)

Quote:
P.S.. Hey Andy, been a long time see u around, hope you are doing good and everything at your end is great.
Getting better now :) (see my post "Apologies" in the Chit Chat forum, and you'll see what I mean :))

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!