Re: Sorting Results
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23465
interpreted = N
texte = I believe your code is correct except it thinks what you are sorting is textnot numbers.  I included the related page from the docs (found underSearch/numbers) below.I hope it help.RH Proutybristol> I am having problems sorting results.  The number 100 is listing below 99,> 98 ...>> Is there a formatting error in my search?>> [search db=[sku].db&eqnamedata=t&bidsort=1&bidsdir=de&max=3]>> Thanks,>> Arthur> http://www.educorp.comxxxxxxxxxx  Docs  xxxxxxxxxxxxSearching - NumbersFieldNametype=numWebCatalog normally compares all fields in a database as though they weretext, even if they look like numbers to you. Unless you tell it to compare afield numerically (or as a date), all comparisons are alphabetical.If your database has a numeric field (Price, for instance) that you wish tocompare numerically, you would put something like the following in thesearch criteria:http://Results.tpl?command=search&gePricedata=99.95&Pricetype=numWhy is this important? Imagine that WebCatalog is comparing two text fieldsthat happen to contain numbers in them:Compare 10.95 to 9.95 -- when compared alphabetically, WebCatalog looksat the first letter in both fields and sees 1 and 9, respectively. Inthis case, it would (wrongly) assume that 9 is greater than 1 (which inan alphabetical sense is true), and would sort 9.95 after 10.95. This isprobably not what you meant.When compared numerically, the two numbers would sort correctly.
Associated Messages, from the most recent to the oldest:
I believe your code is correct except it thinks what you are sorting is textnot numbers.  I included the related page from the docs (found underSearch/numbers) below.I hope it help.RH Proutybristol> I am having problems sorting results.  The number 100 is listing below 99,> 98 ...>> Is there a formatting error in my search?>> [search db=[sku].db&eqnamedata=t&bidsort=1&bidsdir=de&max=3]>> Thanks,>> Arthur> http://www.educorp.comxxxxxxxxxx  Docs  xxxxxxxxxxxxSearching - NumbersFieldNametype=numWebCatalog normally compares all fields in a database as though they weretext, even if they look like numbers to you. Unless you tell it to compare afield numerically (or as a date), all comparisons are alphabetical.If your database has a numeric field (Price, for instance) that you wish tocompare numerically, you would put something like the following in thesearch criteria:http://Results.tpl?command=search&gePricedata=99.95&Pricetype=numWhy is this important? Imagine that WebCatalog is comparing two text fieldsthat happen to contain numbers in them:Compare 10.95 to 9.95 -- when compared alphabetically, WebCatalog looksat the first letter in both fields and sees 1 and 9, respectively. Inthis case, it would (wrongly) assume that 9 is greater than 1 (which inan alphabetical sense is true), and would sort 9.95 after 10.95. This isprobably not what you meant.When compared numerically, the two numbers would sort correctly.
RH Prouty 
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
 
More on the email templates (1997)
 
service stop and restart (1997)
 
Using Plug-In while running 1.6.1 (1997)
 
Showing unopened cart (1997)
 
[BULK] [WebDNA] Happy St. Patricks Day WEBDNA (2018)
 
Separate SSL Server (1997)
 
Printing a final order (1997)
 
RE: creating writefile data from a nested search (1997)
 
international time (1997)
 
Alcatraz must have been nicer than this... (2000)
 
RE:  (1997)
 
Extended [ConvertChars] (1997)
 
Math with Time (1997)
 
WCS Newbie question (1997)
 
simple answer? [hideif] (1997)
 
THANKS (1997)
 
WebSTAR 2.1 freezes my Mac (1997)
 
[WebDNA] Clean URLS job - will pay (2010)
 
 Domain serial issue (2008)
 
 TCP Connect/send and CGI (2003)