Re: sort by day of week...
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 49982
interpreted = N
texte = I don't believe this can be done in a single search - you could do two searches, one for geDAYdata and a second for ltDAYdata.Or, if using WebDNA 5, you could put all found records in a table, adding 7 to the day for events happening before today, then search the table sorting by the modified day which on a Wednesday would have a value in the range 3-9).- brianOn Saturday, May 3, 2003, at 10:47 AM, Joe D'Andrea wrote:> Given a database or regularly scheduled events that are stored as the > day of the week they happen and the name of the happening itself. like > this:>> DAY\tEVENT> 0\tsomething for Sunday> 1\tsomething for Monday> 2\tTuesday event> 5\tskip to Friday> 0\tanother Sunday one> 3\Wednesday schedule>> And given that we know what day today is [date format=%w]>> I can figure out how to search the database so that today's items are > sorted at the top like this:>> [search db=events.db&geDAYdatarq=[date > format=%w]&asDAYsort=1&DAYtype=num]>> And then I'd have to go through some machinations to get the rest of > the days in a second search. What I'd want on Saturday is>> Saturday> Sunday> Monday> Tuesday> ...> Friday>> But if today is Wednesday, I'd want:>> Wednesday> Thursday> Friday> ...> Monday> Tuesday>> Anyone have a cool trick to do this in one search?>> ~joe> -- > ____________________________________________________________> Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com> WEST21.com Internet services for the 21st Century> webhosting ~ co-location ~ wireless access> WebCat and MGI database programming> ____________________________________________________________>-- 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:
I don't believe this can be done in a single search - you could do two searches, one for geDAYdata and a second for ltDAYdata.Or, if using WebDNA 5, you could put all found records in a table, adding 7 to the day for events happening before today, then search the table sorting by the modified day which on a Wednesday would have a value in the range 3-9).- brianOn Saturday, May 3, 2003, at 10:47 AM, Joe D'Andrea wrote:> Given a database or regularly scheduled events that are stored as the > day of the week they happen and the name of the happening itself. like > this:>> DAY\tEVENT> 0\tsomething for Sunday> 1\tsomething for Monday> 2\tTuesday event> 5\tskip to Friday> 0\tanother Sunday one> 3\Wednesday schedule>> And given that we know what day today is [date format=%w]>> I can figure out how to search the database so that today's items are > sorted at the top like this:>> [search db=events.db&geDAYdatarq=[date > format=%w]&asDAYsort=1&DAYtype=num]>> And then I'd have to go through some machinations to get the rest of > the days in a second search. What I'd want on Saturday is>> Saturday> Sunday> Monday> Tuesday> ...> Friday>> But if today is Wednesday, I'd want:>> Wednesday> Thursday> Friday> ...> Monday> Tuesday>> Anyone have a cool trick to do this in one search?>> ~joe> -- > ____________________________________________________________> Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com> WEST21.com Internet services for the 21st Century> webhosting ~ co-location ~ wireless access> WebCat and MGI database programming> ____________________________________________________________>-- 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:
No data - More Info (1997)
[WebDNA] SEARCH question (2011)
Anyone using WebCat UNIX on a busy server yet? (1999)
instant cookies? (1999)
WebDNA Payment Alternatives (2003)
errormessages.db (1997)
[WebDNA] WebDNA future (2010)
Secure Server (1997)
Cart Creation (1998)
2.0 Info (1997)
Showif = stumped? (2001)
Secure Sever and showcart errors (1997)
wc 2 pro users - sites, quotes wanted (1997)
Tracking (2004)
WebTen and WebCat (1997)
Lookup & Form Variables (2000)
Convert Chars Q (2000)
[listfiles] nested in a [loop] (1998)
WC2.0 Memory Requirements (1997)
Protect (1997)