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:
[OT] Google Info (2004)
Help! WebCat2 bug (1997)
Plugin or CGI or both (1997)
Rumpus/Typhoon modules included in Typhoon ... (1997)
Bug Report, maybe (1997)
Emailer Q (2002)
Loop into field (1998)
Username for Admin Group (1997)
Upgrading old WebCat Database Files (1997)
NewCart+Search with one click ? (1997)
Nested tags count question (1997)
[isfolder] and [filename] (1997)
webcat2b12 CGI -- Date comparisons (1997)
Need help... (1997)
BACKGROUND (2000)
How far do [showif]s go? (1997)
Scrape Interest Rates (2005)
ShoppingCart Woes (1998)
OT:looking for developers with solutions (2000)
Storebuilder documentation (2004)