Re: Show new
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48237
interpreted = N
texte = Now that would be too easy, wouldn't it? : )GK> If there's no date field or similar you could always do this...>> [Search db=database.db&neSKUdatarq=find_all&rank=off]> [text show=f]final_total=[numfound][/text]> [founditems]> [showif [index]=[final_total]]> All found data that you want goes here.> [/showif]> [/founditems]> [/search]>> Regards,> Tim>>>> > From: Gary Krockover
> > Reply-To: (WebDNA Talk)> > Date: Fri, 28 Feb 2003 21:28:00 -0600> > To: (WebDNA Talk)> > Subject: Re: Show new> >> > 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 thatyou> > have something to sort on. You could automate the datestamp thatappends> > 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 oneshows> >> 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/-------------------------------------------------------------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:
Now that would be too easy, wouldn't it? : )GK> If there's no date field or similar you could always do this...>> [Search db=database.db&neSKUdatarq=find_all&rank=off]> [text show=f]final_total=[numfound][/text]> [founditems]> [showif [index]=[final_total]]> All found data that you want goes here.> [/showif]> [/founditems]> [/search]>> Regards,> Tim>>>> > From: Gary Krockover > > Reply-To: (WebDNA Talk)> > Date: Fri, 28 Feb 2003 21:28:00 -0600> > To: (WebDNA Talk)> > Subject: Re: Show new> >> > 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 thatyou> > have something to sort on. You could automate the datestamp thatappends> > 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 oneshows> >> 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/-------------------------------------------------------------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/
Gary Krockover
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:
WebDelivery downloads alias, not original ? (1997)
Great product and great job ! (1997)
shipping confusion (2000)
Multiple Users.db Possible? (1997)
Nesting [RAW] (1998)
PCS Frames (1997)
Image maps/Webcat (1997)
So what ya working on? (or have you completed?) (2004)
WebCat cannot handle compatible search parameters? (1997)
No more misunderstanding ... yay! :) (1997)
Different Drive (2003)
WebCatalog/WebMerchant 2.1 (1998)
Directory Overload (1998)
list items (1998)
WebCat2.0b15-to many nested [xx] tags (1997)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
Error message (1999)
[WebDNA] plupload ? (2012)
why is this line in GeneralStore? (1998)
insecure default install on unix (2002)