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:
[MATH] and Dates (1998)
[WebDNA] slideshow (2008)
Netscape v. IE (1997)
Webcat/Webmerchant part II (1998)
Almost a there but..bye bye NetCloak (1997)
Can't load tmpl files (1997)
[LOOKUP] (1997)
I think WebDNA-Talk died ... :( (1997)
WebCat2b15MacPlugIn - [authenticate] not [protect] (1997)
[AppendFile] problem (WebCat2b13 Mac .acgi) (1997)
Migrating From One Server To Another (2003)
Enhancement Request for WebCatalog-NT (1996)
PROBLEM (1997)
Opinion: [input] should be called [output] ... (1997)
passing search criteria (1997)
Setting up shop (1997)
[SHOWIF AND/OR] (1997)
Problem with Formulas.db (1998)
Newbie HW/SW Setup Question (2000)
credit card authorization question (1997)