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:
Search in 2 or more catalogs (1997)
[WebDNA] Putting '&search' into URL killing all search contexts (2010)
RequiredFields template (1997)
That Flakey 'Brawl' thing (1997)
Almost a there but..bye bye NetCloak (1997)
simple answer? [hideif] (1997)
Dynamic drop downs (2005)
RE: Answer: WebDelivery downloads alias, not original ? (1997)
taxrate - off by 1 cent (1997)
Donovans Theorem (2003)
RE: error count with $purchase (1997)
Help needed! (1998)
problems with 2 tags (1997)
WebCat2 - many [carts] on one template page? (1997)
Error 11 (1996)
re:check boxes (1997)
[WebDNA] Search on a database (2012)
Which beta for w* 4.1 and a problem w/b12 (1999)
relogin same user? (1998)
Separate SSL Server (1997)