Date or time comparisons have bugs ...
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 16949
interpreted = N
texte = I have three fields in this.db: cartID, deleteDate and deleteTime, corresponding to the following data:296987757 02/10/1998 13:59:35296987758 02/10/1998 13:59:49296987760 02/10/1998 14:00:00297229722 03/10/1998 14:07:10297422049 04/01/1998 20:21:39297489625 04/09/1998 16:04:12297489636 04/09/1998 16:06:08My code, which is designed to delete records, looks like this:[search db=this.db&ledeleteDatedatarq=[date]&ledeleteTimedatarq=[time]&deleteDatetype=date][founditems][delete db=this.db&eqcartIDdatarq=[cartID]][/founditems][/search]So why doesn't it delete all but the last three records?Clearly it *should* delete the first 4 records because both the dates AND the times are *less than* the current date and time, which is 04/08/1998 and 16:12:00 ... so, is there a bug in WebCatalog's code that's causing this problem?Or is there a better way of coding this stuff so that it actually works?Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Associated Messages, from the most recent to the oldest:
I have three fields in this.db: cartID, deleteDate and deleteTime, corresponding to the following data:296987757 02/10/1998 13:59:35296987758 02/10/1998 13:59:49296987760 02/10/1998 14:00:00297229722 03/10/1998 14:07:10297422049 04/01/1998 20:21:39297489625 04/09/1998 16:04:12297489636 04/09/1998 16:06:08My code, which is designed to delete records, looks like this:[search db=this.db&ledeleteDatedatarq=
[date]&ledeleteTimedatarq=
[time]&deleteDatetype=date]
[founditems][delete db=this.db&eqcartIDdatarq=[cartID]][/founditems][/search]So why doesn't it delete all but the last three records?Clearly it *should* delete the first 4 records because both the dates AND the times are *less than* the current date and time, which is 04/08/1998 and 16:12:00 ... so, is there a bug in WebCatalog's code that's causing this problem?Or is there a better way of coding this stuff so that it actually works?Sincerely,Ken Grome808-737-6499WebDNA Solutionsmailto:ken@webdna.nethttp://www.webdna.net
Kenneth Grome
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:
Newbie questions (1998)
Performance Issue (2000)
Nested Lookups (1998)
Search 1 Field Twice? (2004)
RE: Can't get appendfile to work (1997)
[WebDNA] sem_open bugfix for os x version 6.2 (2012)
[WebDNA] OT: Anyone implemented markitup? (2012)
WebCatb15 Mac CGI -- [purchase] (1997)
More on the email templates (1997)
Help! WebCat2 bug (1997)
Webstar 1.3.1 PPC (1997)
Off Topic: Help Wanted (1997)
[OT] SSL security in browser (2005)
[OT] Am I an Idiot? (2004)
How do you cause a new window to appear behind the current window? (1999)
emailer on Windows Beta 18 (1997)
RE: Subtotal help (1997)
[shownext max (1997)
[WebDNA] [ipaddress] - [RealIP] - Not working properly (2016)
Form and Context Searching -Hideif/Showif (2000)