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:
intel mac (2006)
SSI *nix 4.5 build (2002)
SKU lookup (1997)
Protect and Serve (1999)
Summary search -- speed (1997)
WCS Newbie question (1997)
E-mailer application times out (1998)
[WriteFile] problems (1997)
how would you trigger something to happen once a week - every (2001)
WC2b15 - [HTMLx]...[/HTMLx] problems SOLVED! (1997)
Bad card db - *mislabled post* (1999)
Help: Append context problems (1999)
cart (1997)
Wireless WebDNA available today! (2000)
[WebDNA] Image Magick and Webdna (2009)
help! problem using [referrer] still in 2.01 (1997)
What am I missing (1997)
EIMS & emailer conflicts? (1999)
[include] (1998)
This list needs a digest: rant, rave... (1997)