Sorting Problems

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55454
interpreted = N
texte = Hi, I have records stored in a db that each have a date chosen by the user - [RecordDate]. (I.e. the records all have a date but they are not necessarily in the Db in date order - so rank=off won't work.) By default a user will view a page of records loaded with the [RecordDate] most recent 10, although they can choose to view 20, 50 or all matching records. The nature of the site requires that records appear on the page horizontally, earliest first. eg: 5th Jansome data 1 6th Jansome data 2 10th Jansome data 3 To restrict my search to max=10 is easy and sort latest first RecordDatesort=1&RecordDatesdir=de is fine but the results come out "upside down": 10th Jansome data 3 6th Jansome data 2 etc Anyone think of an elegant solution to this problem? Thanks Pat ps something like this has been mentioned, seems a bit processor intensive tho: [search db=patsrecords.db&eqcriteriadata=[criteria]&RecordDatesort=1&RecordDates dir=as] [text]OnlyShowIndex=[math][numfound]-[MaxRecords][/math][/text] [founditems] [hideif [index]<[OnlyShowIndex]] Whatever [/hideif] [/founditems] [/search] ....or sumfin...:) --------------------------------------------------------- Netro42 - http://www.netro42.com Web design and development --------------------------------------------------------- Netro42 Limited 39 - 51 Highgate Road London NW5 1RT T: 020 7267 7002 F: 020 7267 7544 E: mailto:patrick.holliday@netro42.com --------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Sorting Problems ( Toby Cox 2004)
  2. Re: Sorting Problems ( Brian Fries 2004)
  3. Re: Sorting Problems ( Glenn Busbin 2004)
  4. Re: Sorting Problems ( Pat Holliday 2004)
  5. Re: Sorting Problems ( Glenn Busbin 2004)
  6. Re: Sorting Problems ( Brian Fries 2004)
  7. Re: Sorting Problems ( Joe D'Andrea 2004)
  8. Re: Sorting Problems ( Gary Krockover 2004)
  9. Sorting Problems ( Pat Holliday 2004)
  10. Re: Sorting problems (Kenneth Grome 2000)
Hi, I have records stored in a db that each have a date chosen by the user - [RecordDate]. (I.e. the records all have a date but they are not necessarily in the Db in date order - so rank=off won't work.) By default a user will view a page of records loaded with the [RecordDate] most recent 10, although they can choose to view 20, 50 or all matching records. The nature of the site requires that records appear on the page horizontally, earliest first. eg: 5th Jansome data 1 6th Jansome data 2 10th Jansome data 3 To restrict my search to max=10 is easy and sort latest first RecordDatesort=1&RecordDatesdir=de is fine but the results come out "upside down": 10th Jansome data 3 6th Jansome data 2 etc Anyone think of an elegant solution to this problem? Thanks Pat ps something like this has been mentioned, seems a bit processor intensive tho: [search db=patsrecords.db&eqcriteriadata=[criteria]&RecordDatesort=1&RecordDates dir=as] [text]OnlyShowIndex=[math][numfound]-[MaxRecords][/math][/text] [founditems] [hideif [index]<[OnlyShowIndex]] Whatever [/hideif] [/founditems] [/search] ....or sumfin...:) --------------------------------------------------------- Netro42 - http://www.netro42.com Web design and development --------------------------------------------------------- Netro42 Limited 39 - 51 Highgate Road London NW5 1RT T: 020 7267 7002 F: 020 7267 7544 E: mailto:patrick.holliday@netro42.com --------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Pat Holliday

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:

checksum for credit cards? (1997) Applescript, WebDNA, and PDF (1997) [WebDNA] unique words (2009) SQL Madness (2005) Need help with emailer- 2 issues (1997) emailer (1997) [Off] Netscape Display Problem (1998) Why did this copyfile stop working? (2004) calculating tax rates, mail order solutions and version 2 (1997) [raw] & typhoon pro 3.0 or 4.0 (2001) A little syntax help (1997) Problems passing [SKU] with $Replace in 2.0 (1997) SPAM (OT) (2004) PCS Frames (1997) [lookup] vs. [search] (1998) Re:Emailer (1998) Multi Actions (1999) Sorting Number with commas (2001) Show all from database (2001) Context and commands (1998)