Re: Show new
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48242
interpreted = N
texte = Thanks for all your help guys. I do have a date field in the database so from the code you guys posted it should be easy. I felt kind of stupid asking a question like that, I've been using webcatalog for three years, I can alter store builder beyond recognition and create many different and strange things, but I can't figure out the search string. I crack myself up sometimes.Thanks again,Craig Forest>I'm thinking that Craig doesn't have a date field in his database, so>nothing to sort on datewise. Off-hand, I can't think of way to search a>database and return the last append if there is no date information also>being saved with it. Craig, you may need to add such a field so that you>have something to sort on. You could automate the datestamp that appends>with each record and then sort on that:>>[append db=somedatabase.db][!]>[/!]sku=[url][sku][/sku][!]>[/!]&dateindb=[date][!]>[/!]&timeindb=[time][!]>[/!][/append]>>GK>>>>>> There are number of ways you can do it, and it can depend on what your>field>> names are.>>>> Basically, search for this:>> [Search>db=database.db&neFIELDNAMEdatarq=find_all&deFIELDNAME2sort=1&max=1]>>>> First it finds all, then it sorts in descending order on FIELDNAME2 (which>> has to sort in a first to last order), and max=1 means the last one shows>> up.>>>> If you have a DBDATE field and a DBTIME field (for when the entry was>> appended), then you would do this:>> [Search>>>db=database.db&neFIELDNAMEdatarq=find_all&deDBDATEsort=1&deDBTIMEsort=2&max=>> 1]>>>> Regards,>> Tim>>>> > From: Craig Forest
>> > Reply-To: (WebDNA Talk)>> > Date: Fri, 28 Feb 2003 18:15:01>> > To: (WebDNA Talk)>> > Subject: Show new>> >>> > Hello,>> >>> > This is a very basic question but I just can't seem to figure it out.>> > I have an article system set up, and I want to be able to search and>> > show only the newest article. It appends to a database so how would I>> > go about searching the database and only returning the newest record?>> >>> >>> > Thanks,>> >>> > Craig Forest>> >>> >>> > ------------------------------------------------------------->> > 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/>> >>>>>>> ------------------------------------------------------------->> 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/>>>------------------------------------------------------------->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/>>-------------------------------------------------------------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:
Thanks for all your help guys. I do have a date field in the database so from the code you guys posted it should be easy. I felt kind of stupid asking a question like that, I've been using webcatalog for three years, I can alter store builder beyond recognition and create many different and strange things, but I can't figure out the search string. I crack myself up sometimes.Thanks again,Craig Forest>I'm thinking that Craig doesn't have a date field in his database, so>nothing to sort on datewise. Off-hand, I can't think of way to search a>database and return the last append if there is no date information also>being saved with it. Craig, you may need to add such a field so that you>have something to sort on. You could automate the datestamp that appends>with each record and then sort on that:>>[append db=somedatabase.db][!]>[/!]sku=[url][sku][/sku][!]>[/!]&dateindb=[date][!]>[/!]&timeindb=[time][!]>[/!][/append]>>GK>>>>>> There are number of ways you can do it, and it can depend on what your>field>> names are.>>>> Basically, search for this:>> [Search>db=database.db&neFIELDNAMEdatarq=find_all&deFIELDNAME2sort=1&max=1]>>>> First it finds all, then it sorts in descending order on FIELDNAME2 (which>> has to sort in a first to last order), and max=1 means the last one shows>> up.>>>> If you have a DBDATE field and a DBTIME field (for when the entry was>> appended), then you would do this:>> [Search>>>db=database.db&neFIELDNAMEdatarq=find_all&deDBDATEsort=1&deDBTIMEsort=2&max=>> 1]>>>> Regards,>> Tim>>>> > From: Craig Forest >> > Reply-To: (WebDNA Talk)>> > Date: Fri, 28 Feb 2003 18:15:01>> > To: (WebDNA Talk)>> > Subject: Show new>> >>> > Hello,>> >>> > This is a very basic question but I just can't seem to figure it out.>> > I have an article system set up, and I want to be able to search and>> > show only the newest article. It appends to a database so how would I>> > go about searching the database and only returning the newest record?>> >>> >>> > Thanks,>> >>> > Craig Forest>> >>> >>> > ------------------------------------------------------------->> > 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/>> >>>>>>> ------------------------------------------------------------->> 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/>>>------------------------------------------------------------->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/>>-------------------------------------------------------------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/
Craig Forest
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:
WebCatalog [FoundItems] Problem - AGAIN - (1997)
NT vs Mac (1997)
Sku numbers (1997)
Document contains no data... (1999)
db security on NT (1997)
Using Applescript to process WebCatalog functions (1998)
WebCat2: multiple currency support (1997)
Add - optional parameters textA=.... (1997)
Number searching/formats (1998)
bcc and sendmail (2001)
oops private message leaked into talk list (1997)
Web DNA... (2007)
ConvertChars (1998)
WebCat hosting providers? (1997)
Math, Multiple Equasions and Show/Hide (1998)
RE: WebCat and image maps (1997)
writing checkboxes to a database (2000)
Re1000001: Setting up shop (1997)
Using WC for Bulk Emailings (1997)
[SHOWIF AND/OR] (1997)