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 16th Jansome data 210th Jansome data 3To restrict my search to max=10 is easy and sort latest firstRecordDatesort=1&RecordDatesdir=deis fine but the results come out "upside down":10th Jansome data 36th Jansome data 2etcAnyone think of an elegant solution to this problem?ThanksPatps 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.comWeb design and development---------------------------------------------------------Netro42 Limited39 - 51 Highgate Road London NW5 1RTT: 020 7267 7002F: 020 7267 7544E: 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:
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 16th Jansome data 210th Jansome data 3To restrict my search to max=10 is easy and sort latest firstRecordDatesort=1&RecordDatesdir=deis fine but the results come out "upside down":10th Jansome data 36th Jansome data 2etcAnyone think of an elegant solution to this problem?ThanksPatps 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.comWeb design and development---------------------------------------------------------Netro42 Limited39 - 51 Highgate Road London NW5 1RTT: 020 7267 7002F: 020 7267 7544E: 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:
OS X problem: when using [ShowCart] or [orderfile]... (2000)
[HIDEIF] inside [FOUNDITEM] (1997)
send mail problem? (1997)
MacAuthorize and WebMerchant (1997)
Major bug report on rootbeer (1997)
RE: Contexts and Ampersands (1997)
iis 4.0 (1997)
Universal root for WC errors? (1997)
Running 2 two WebCatalog.acgi's (1996)
Updating Prices in Online Database (1999)
Anyone awake? Newby moves deeper! Sitesearch & (2000)
PCS Frames (1997)
[WebDNA] [lookup returning nothing at all.. not even the notfound param. (2010)
[WebDNA] WebDNA-folder-Mac-FastCGI-8.5.1.zip (404 error) (2018)
$flushdatabases question ... (1998)
Emailer setup (1997)
[ot] html question (2000)
Weird problems with [SHOWIF]s (1997)
shipping costs (1998)
what servers are supported for Typhoon? (1997)