Re: Sorting Problems
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55457
interpreted = N
texte = How 'bout this... Assuming you've got answers for the sorting issues posted by the others...Instead of directly dumping the data to the page within the founditems loop, stick them into a text variable, pre-pending the new record in front of the previously found records. After leaving the founditems, dump the text variable onto the page.Something like this:[text]tList=[/text][search db=... allhit=1&RecordDatesort=1&RecordDatesdir=de&max=10][founditems][text]tList=[recorddate] [data]
[tList][/text][/founditems][/search][tList].... of course, [tList] could be filled with table rows or whatever you desire. The key is you're sticking the new record in the FRONT of the [tList] variable, before the previous records, so they will be displayed in reverse order of WebDNA's sorting.- brianOn Jan 13, 2004, at 10:52 AM, Pat Holliday wrote:> 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&RecordDate > sdir=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-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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:
How 'bout this... Assuming you've got answers for the sorting issues posted by the others...Instead of directly dumping the data to the page within the founditems loop, stick them into a text variable, pre-pending the new record in front of the previously found records. After leaving the founditems, dump the text variable onto the page.Something like this:[text]tList=[/text][search db=... allhit=1&RecordDatesort=1&RecordDatesdir=de&max=10][founditems][text]tList=[recorddate] [data]
[tList][/text][/founditems][/search][tList].... of course, [tList] could be filled with table rows or whatever you desire. The key is you're sticking the new record in the FRONT of the [tList] variable, before the previous records, so they will be displayed in reverse order of WebDNA's sorting.- brianOn Jan 13, 2004, at 10:52 AM, Pat Holliday wrote:> 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&RecordDate > sdir=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-- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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/
Brian Fries
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:
Email template names (1997)
More Applescript (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
Dynamic PDFs? (2002)
Browser (agent) stats... (2004)
Carrying Forward (1998)
F3 crashing server (1997)
Roundup function? (1997)
OT: Poll Please (2002)
Database Fields (1997)
In Digest Dijon (2000)
Max Record length restated as maybe bug (1997)
Is everybody getting all the posts? (2002)
[protect] on NT? (1997)
[searchString] (1997)
PCS Frames (1997)
2.0 Info (1997)
[WebDNA] An alternative to hosting... (2009)
E-Mailer (WebCatb15acgiMac) (1997)
Re(2): Append command (1999)