Re: Sort Order on a page search

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 10584
interpreted = N
texte = Robert:I assume you're using WebCat 2. There are a lot of changes, one of which is that all fields are text fields. However, they can be treated as number fields by the search routines. The results of your first search is correct if you consider the numbers to be text (i.e. 10 is less than 2). If you want them sorted as numbers you need to add int1type=num to the other parameters you already have. Thus you would have db=songlist.txt&int1sort=1&eqskudata=[url][sku][/url]&int1type=num. As a side note, I noticed that the period after the number seems to be in the database field? That shouldn't cause any problems, the search routines will simply view them as real (decimal) numbers instead of integers (which it does for all numbers anyway).John.>I have a returned list from a second database. It returns a list of >songs. These songs are numbered by [int1] names are [text1]. Here is the >code I am using: > >[search db=songlist.txt&int1sort=1&eqskudata=[url][sku][/url]] > >[founditems] > >[int1] [text1]
> >[/founditems] > >[/search] > >Except my sort order somes out as follows: > >1. I am a frog. >10. I am a green filthy freakin frog. >2. I am a freak. >3. I am a green frog. >4. I am a filthy frog. > >I tried >[search db=songlist.txt&int1type=numsort=1&eqskudata=[url][sku][/url]] > >but webcat didn't like it sooooo. > > >Robert Minor > >__________________________________________________________ >CyberMill Website Designers & Publishers >8616 Joseph Ave >St. Louis, MO 63144 >voice 314-962-4024 >email: webmaster@cybermill.com >http://www.cybermill.com/ >__________________________________________________________ >We are not responsible for any misspelling or misinformation >please check with your internet provider for defects. > > >------------------------------------ >To leave this talk list send an email to >macjordomo@smithmicro.com >with BODY >unsubscribe WebDNA-Talk >------------------------------------ > > > John A. Hill, V.P. Marketing ********************************* Pacific Coast Software * Home of the Web's best 11770 Bernardo Plaza Ct. #462 * Catalog and Merchant software San Diego, CA 92128 * http://www.smithmicro.com Phone: 619-675-1106 Fax: 675-0372 ********************************* ------------------------------------ To leave this talk list send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ Associated Messages, from the most recent to the oldest:

    
  1. Re: Sort Order on a page search (Robert Minor 1997)
  2. Re: Sort Order on a page search (Kenneth Grome 1997)
  3. Re: Sort Order on a page search (Grant Hulbert 1997)
  4. Re: Sort Order on a page search (John Hill 1997)
  5. Sort Order on a page search (Robert Minor 1997)
Robert:I assume you're using WebCat 2. There are a lot of changes, one of which is that all fields are text fields. However, they can be treated as number fields by the search routines. The results of your first search is correct if you consider the numbers to be text (i.e. 10 is less than 2). If you want them sorted as numbers you need to add int1type=num to the other parameters you already have. Thus you would have db=songlist.txt&int1sort=1&eqskudata=[url][sku][/url]&int1type=num. As a side note, I noticed that the period after the number seems to be in the database field? That shouldn't cause any problems, the search routines will simply view them as real (decimal) numbers instead of integers (which it does for all numbers anyway).John.>I have a returned list from a second database. It returns a list of >songs. These songs are numbered by [int1] names are [text1]. Here is the >code I am using: > >[search db=songlist.txt&int1sort=1&eqskudata=[url][sku][/url]] > >[founditems] > >[int1] [text1]
> >[/founditems] > >[/search] > >Except my sort order somes out as follows: > >1. I am a frog. >10. I am a green filthy freakin frog. >2. I am a freak. >3. I am a green frog. >4. I am a filthy frog. > >I tried >[search db=songlist.txt&int1type=numsort=1&eqskudata=[url][sku][/url]] > >but webcat didn't like it sooooo. > > >Robert Minor > >__________________________________________________________ >CyberMill Website Designers & Publishers >8616 Joseph Ave >St. Louis, MO 63144 >voice 314-962-4024 >email: webmaster@cybermill.com >http://www.cybermill.com/ >__________________________________________________________ >We are not responsible for any misspelling or misinformation >please check with your internet provider for defects. > > >------------------------------------ >To leave this Talk List send an email to >macjordomo@smithmicro.com >with BODY >unsubscribe WebDNA-Talk >------------------------------------ > > > John A. Hill, V.P. Marketing ********************************* Pacific Coast Software * Home of the Web's best 11770 Bernardo Plaza Ct. #462 * Catalog and Merchant software San Diego, CA 92128 * http://www.smithmicro.com Phone: 619-675-1106 Fax: 675-0372 ********************************* ------------------------------------ To leave this Talk List send an email to macjordomo@smithmicro.com with BODY unsubscribe WebDNA-Talk ------------------------------------ John Hill

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] WebDNA Host being retired (2014) New index for docs (1997) Not really WebCat (1997) [OT] OSX (unix) favorite text editor. (2002) Country & Ship-to address & other fields ? (1997) ImageMagick on OSX (2003) [WebDNA] Encode cookies ONLY via "method=Base64" (2008) Banners and sort of random display (1997) SSL (1998) ErrorLog.txt bug (1998) beta 6 on OSX wierdness | more (2000) Shipping by order total (2003) writefiles (1999) WebCatalog 2.0 & WebDNA docs in HTML ... (1997) WCS Newbie question (1997) Triggers Suck! (2000) [WebDNA] blank or nonexistent field detector (2011) WebCat2b15MacPlugin - [protect] (1997) ShowNext (1997) [cart] (1998)