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] Initial setup problems with 6.2 (2009)
Feature Request (2003)
WebMerchant - MacAuthorize (1999)
RE: [WebDNA] XML Help please (2009)
WebCat2 beta 11 - new prefs ... (1997)
Automated FTP from Shell (2004)
[searchString] (1997)
NT considerations (1997)
WebCatReference pages partly blank/empty on Webcat 3.0.7 NT (2000)
ShowNext for method=POST (1997)
Email within tmpl ? (1997)
Automating a Post Method (2000)
PCS Frames (1997)
Database Term [brainfart] (2003)
WC2.0 Memory Requirements (1997)
Creating comums (1998)
Random Image (1998)
shownext example (2001)
Re:Variable Math (1998)
Error Msg (1997)