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:
Search Philosophy (2001)
Setting up shop (1997)
Variables from a long text string (2000)
Site Specific Shopping Cart folder and Orderfiles (2000)
Webcat causing crashes left and right! (1997)
OT: A new perspective ... (2005)
DomainList (2005)
read and write you own cookies with webcat (1997)
Emailer Set Up (1997)
Weird Problem (1997)
Submitting ampersands in forms... (1998)
WebCatalog2 Feature Feedback (1996)
[shownext] and sort (1998)
Re:HTTP header line is too long? (1997)
WebDNA Writer Needed (1997)
find with exceptions (1997)
I give up!! (1997)
expired beta (1997)
Comments in db? (1997)
The Depths of Credit Card Payment (2003)