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:
Calculating multiple shipping... (1997)
emailer (1997)
Counter for SKUs viewed (2002)
Looking For WebCatalog Migration Assistance (2003)
[writefile]? (2001)
Protecting webdelivery (1997)
[OT] C++ (2000)
Generating Report Totals (1997)
WebCat2b15MacPlugin - showing [math] (1997)
email program problem (1998)
Communigate+Webcat (2001)
Windows 2.1b2 Append Bug? (1997)
MacWEEK article help needed (1996)
Separate SSL Server (1997)
Modify instead of Add (2000)
creating a ShipCosts database (1997)
WebCat2: Items xx to xx shown, etc. (1997)
email preferences on NT (1997)
TCP connect, how long does it take (PCS please) (1999)
Beta 18 (1997)