Re: Sorting
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 18225
interpreted = N
texte = >I am trying to return a search in a specific order. Within the context>of a hyperlink I would like to have all items that have the value YES>in the NEWITEM field of a database listed at the top of the founditems,>then all others that meet the search criteria would follow. I have>tried the following syntax with no luck:>>
HREF=/cgi-bin/items.tpl?command=search&db=../products.db&eqSTORE1datarq=golf&w>sTYPE1datarq=Books&eqPRONAMEdatarq=[url][PRONAME][/url]&cart=[cart]&searchPRONAM>E=[url][PRONAME][/url]&eqNEWITEMdata=YES&NEWITEMsort=1&NEWITEMsdir=as&max=150>>target=body>[PRONAME]Try removing NEWITEMsort=1&NEWITEMsdir=asSounds like you want the default ranking, which means better matches areat the top of the list. You get this ranking by *not* specifying anyparticular field to sort on (because if you tell it to sort by NEWITEM, youare forcing that to be the sort field, which undoes the nice ranking). Thedefault ranking puts records at the top of the list that have more fieldmatches, which in your case puts NEWITEM=YES above all others, followed byrecords that do not have NEWITEM=YES.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>I am trying to return a search in a specific order. Within the context>of a hyperlink I would like to have all items that have the value YES>in the NEWITEM field of a database listed at the top of the founditems,>then all others that meet the search criteria would follow. I have>tried the following syntax with no luck:>>
HREF=/cgi-bin/items.tpl?command=search&db=../products.db&eqSTORE1datarq=golf&w>sTYPE1datarq=Books&eqPRONAMEdatarq=[url][PRONAME][/url]&cart=
[cart]&searchPRONAM>E=
[url][PRONAME][/url]&eqNEWITEMdata=YES&NEWITEMsort=1&NEWITEMsdir=as&max=150>>target=body>[PRONAME]Try removing NEWITEMsort=1&NEWITEMsdir=asSounds like you want the default ranking, which means better matches areat the top of the list. You get this ranking by *not* specifying anyparticular field to sort on (because if you tell it to sort by NEWITEM, youare forcing that to be the sort field, which undoes the nice ranking). Thedefault ranking puts records at the top of the list that have more fieldmatches, which in your case puts NEWITEM=YES above all others, followed byrecords that do not have NEWITEM=YES.Technical Support | ==== eCommerce and Beyond ====Pacific Coast Software | WebCatalog, WebMerchant,11770 Bernardo Plaza Court | SiteEdit Pro, PhotoMaster,San Diego, CA 92128 | Typhoon619/675-1106 Fax: 619/675-0372 | http://www.smithmicro.com/
PCS Technical Support
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:
[WebDNA] COMMITDATABASE in linux unix 64bits FastCGI version 8.6 (2020)
unable to launch acgi in WebCat (1997)
Confused about QTY and QTY* price updating (1998)
expired beta (1997)
Sorting Numbers (1997)
OLD ORDERS (1998)
WebCat2b15MacPlugin - showing [math] (1997)
More DateMath problems (1997)
Configuring E-mail (1997)
bye bye tax rate (1998)
Document Contains No Data! (1997)
Calendar Snippet Problems (1998)
Auto conversion of URLs? (1998)
A Global Variable (1997)
Attn: Bug in GeneralStore example b15 (1997)
NT Manual (1997)
For you Unix gurus [OT] (2002)
Keeping text formatting (like hard returns) (2002)
WebCat2 several catalogs? (1997)
[WebDNA] How to go into old WebCatalog? (2009)