Re: question: search return in order

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12714
interpreted = N
texte = >When I have the thankyou.tmpl page do a search for serial numbers based >upon whether they were sold or not, the search results are random and not >necessarily in the order that they appear on the db. For instance, SKU >1,2,3,4,5,6 can be all marked as Sold=F but the search result of the db >with a max=2 will give me back SKU 3 and 5 or if I do it again results come >back as 1 and 4. > >Question: > >Is there a way to set the search up so that it when a max=2 that it will >give me SKU 1 and 2? And if SKU 1 is Sold=T then the results would then be >SKU 2 and 3? Not the random results. Try adding &asskusort=1&skutype=num to your search parameters. The &asskusort=1 tells WebCat to sort the matching sku values in ascending order, and the skutype=num tells WebCat that the sku values are numbers and should be sorted as numbers instead of being sorted as text.Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html. Associated Messages, from the most recent to the oldest:

    
  1. Re: question: search return in order (Kenneth Grome 1997)
  2. question: search return in order (Kevin Furuta 1997)
>When I have the thankyou.tmpl page do a search for serial numbers based >upon whether they were sold or not, the search results are random and not >necessarily in the order that they appear on the db. For instance, SKU >1,2,3,4,5,6 can be all marked as Sold=F but the search result of the db >with a max=2 will give me back SKU 3 and 5 or if I do it again results come >back as 1 and 4. > >Question: > >Is there a way to set the search up so that it when a max=2 that it will >give me SKU 1 and 2? And if SKU 1 is Sold=T then the results would then be >SKU 2 and 3? Not the random results. Try adding &asskusort=1&skutype=num to your search parameters. The &asskusort=1 tells WebCat to sort the matching sku values in ascending order, and the skutype=num tells WebCat that the sku values are numbers and should be sorted as numbers instead of being sorted as text.Sincerely, Ken Grome WebDNA Solutions http://www.hui.net/dna/webdna.html. Kenneth Grome

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:

sorting dates (1999) RE: Help name our technology! (1997) [WebDNA] Databases not staying open (2010) replacing founditems ... (2002) [WebDNA] Upgrade 4.5.1 to 6.0a (2009) converchars in sendmail context.... (2004) Selected Item in Pop-down (2003) Adding a donation amount (2000) webcat2b12 CGI -- Date comparisons (1997) Simple way to create unique SKU (1997) unable to launch acgi in WebCat (1997) WCf2 and nested tags (1997) [Capitalize] (1998) off topic - dna snipets (1997) Trouble starting WC under OSX (2001) WebMerchant and Mac Auth Hub Help Please (1999) Credit card processing - UK (1997) Summing fields (1997) Not reading code (1997) [sendmail] on NT? (1997)