Re: [what] [am] [I] [missing]?

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 51093
interpreted = N
texte = Ok, for the archives...If anybody ends up needing a Rating System and wants to use my code (below) be sure to change the ¬Found=NOT_FOUND in the [lookup] to ¬Found=0 and then change the following [showif] from [showif [exists]=NOT_FOUND] to [showif [exists]=0] and remove the [math] context within the [showif].Otherwise you will lose your first vote (I don't know why).-Dan ------------------------------------------------------------ http://www.StrongGraphicDesign.com (208) 319-0137 | Toll-free p/f 877-561-1656 ------------------------------------------------------------ On Sat, 2003/06/14 08:40:11 -0700 Dan Strong wrote: >Duh... > >Forgot to add ampersands to my append context... >--------------------------------- >[append db=^article_ratings/article_ratings.db][!] >[/!]article=[thisArticle][!] >[/!]&vote1=0[!] >[/!]&vote2=0[!] >[/!]&vote3=0[!] >[/!]&vote4=0[!] >[/!]&vote5=0[!] >[/!][/append] >--------------------------------- > >And it turns out it WAS writing to the .db, but for some reason I just didn't see it (don't >ask....) > >Thanks anyway for anyone who's wheel started turning on this. > >-Dan 'ampersand' Strong >------------------------------------------------------------ >http://www.StrongGraphicDesign.com >(208) 319-0137 | Toll-free p/f 877-561-1656 >------------------------------------------------------------ > > > > >On Sat, 2003/06/14 08:30:48 -0700 > Dan Strong wrote: >>OK, it's got to be something simple -- probably syntax related -- that is causing this logic to >>just plain not work. When I hit the submit button it goes to the page, but doesn't write to the >>.db or anything... >> >>Can anybody see anything obvious that I am missing? >> >>FORM: >>-------------------------------------------------------------- >>
>> >> >> >> >> >> >> >>
>>-------------------------------------------------------------- >> >>article_vote.html: >>-------------------------------------------------------------- >>[!] -- ## Check to see if article record already exists in database -- [/!] >> [text show=f]exists=[lookup >>db=^article_ratings/article_ratings.db&lookinfield=ARTICLE&value=[thisArticle]&returnfield=[rating]¬Found=NOT_FOUND][/text] >>[!] -- ## END Check to see if article record already exists in database -- [/!] >> >>[!] -- ## If article already exists in database, then add vote. If not, create record, then add >>vote -- [/!] >> >> [showif [exists]=NOT_FOUND] >> [append db=^article_ratings/article_ratings.db][!] >>[/!]article=[thisArticle][!] >>[/!]vote1=0[!] >>[/!]vote2=0[!] >>[/!]vote3=0[!] >>[/!]vote4=0[!] >>[/!]vote5=0[!] >>[/!][/append] >> >>[math show=f]exists=0[/math] >> [/showif] >> >>[replace db=^article_ratings/article_ratings.db&eqARTICLEdata=[thisArticle]&[rating]type=num][!] >>[/!][rating]=[math][exists]+1[/math][!] >>[/!][/replace] >> >>[!] -- ## END If article already exists in database, then add vote. If not, create record, then >>add vote -- [/!] >>-------------------------------------------------------------- >> >>article_ratings.db: >>-------------------------------------------------------------- >>ARTICLEVOTE1VOTE2VOTE3VOTE4VOTE5 >>-------------------------------------------------------------- >> >>Thanks in advance, >> >>-Dan >>------------------------------------------------------------ >>http://www.StrongGraphicDesign.com >>(208) 319-0137 | Toll-free p/f 877-561-1656 >>------------------------------------------------------------ >> >>------------------------------------------------------------- >>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:

    
  1. Re: [what] [am] [I] [missing]? (Dan Strong 2003)
  2. Re: [what] [am] [I] [missing]? (Rob Marquardt 2003)
  3. Re: [what] [am] [I] [missing]? (Dan Strong 2003)
  4. Re: [what] [am] [I] [missing]? (Dan Strong 2003)
  5. [what] [am] [I] [missing]? (Dan Strong 2003)
Ok, for the archives...If anybody ends up needing a Rating System and wants to use my code (below) be sure to change the ¬Found=NOT_FOUND in the [lookup] to ¬Found=0 and then change the following [showif] from [showif [exists]=NOT_FOUND] to [showif [exists]=0] and remove the [math] context within the [showif].Otherwise you will lose your first vote (I don't know why).-Dan ------------------------------------------------------------ http://www.StrongGraphicDesign.com (208) 319-0137 | Toll-free p/f 877-561-1656 ------------------------------------------------------------ On Sat, 2003/06/14 08:40:11 -0700 Dan Strong wrote: >Duh... > >Forgot to add ampersands to my append context... >--------------------------------- >[append db=^article_ratings/article_ratings.db][!] >[/!]article=[thisArticle][!] >[/!]&vote1=0[!] >[/!]&vote2=0[!] >[/!]&vote3=0[!] >[/!]&vote4=0[!] >[/!]&vote5=0[!] >[/!][/append] >--------------------------------- > >And it turns out it WAS writing to the .db, but for some reason I just didn't see it (don't >ask....) > >Thanks anyway for anyone who's wheel started turning on this. > >-Dan 'ampersand' Strong >------------------------------------------------------------ >http://www.StrongGraphicDesign.com >(208) 319-0137 | Toll-free p/f 877-561-1656 >------------------------------------------------------------ > > > > >On Sat, 2003/06/14 08:30:48 -0700 > Dan Strong wrote: >>OK, it's got to be something simple -- probably syntax related -- that is causing this logic to >>just plain not work. When I hit the submit button it goes to the page, but doesn't write to the >>.db or anything... >> >>Can anybody see anything obvious that I am missing? >> >>FORM: >>-------------------------------------------------------------- >>
>> >> >> >> >> >> >>[thisurl]> >>
>>-------------------------------------------------------------- >> >>article_vote.html: >>-------------------------------------------------------------- >>[!] -- ## Check to see if article record already exists in database -- [/!] >> [text show=f]exists=[lookup >>db=^article_ratings/article_ratings.db&lookinfield=ARTICLE&value=[thisArticle]&returnfield=[rating]¬Found=NOT_FOUND][/text] >>[!] -- ## END Check to see if article record already exists in database -- [/!] >> >>[!] -- ## If article already exists in database, then add vote. If not, create record, then add >>vote -- [/!] >> >> [showif [exists]=NOT_FOUND] >> [append db=^article_ratings/article_ratings.db][!] >>[/!]article=[thisArticle][!] >>[/!]vote1=0[!] >>[/!]vote2=0[!] >>[/!]vote3=0[!] >>[/!]vote4=0[!] >>[/!]vote5=0[!] >>[/!][/append] >> >>[math show=f]exists=0[/math] >> [/showif] >> >>[replace db=^article_ratings/article_ratings.db&eqARTICLEdata=[thisArticle]&[rating]type=num][!] >>[/!][rating]=[math][exists]+1[/math][!] >>[/!][/replace] >> >>[!] -- ## END If article already exists in database, then add vote. If not, create record, then >>add vote -- [/!] >>-------------------------------------------------------------- >> >>article_ratings.db: >>-------------------------------------------------------------- >>ARTICLEVOTE1VOTE2VOTE3VOTE4VOTE5 >>-------------------------------------------------------------- >> >>Thanks in advance, >> >>-Dan >>------------------------------------------------------------ >>http://www.StrongGraphicDesign.com >>(208) 319-0137 | Toll-free p/f 877-561-1656 >>------------------------------------------------------------ >> >>------------------------------------------------------------- >>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/ Dan Strong

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:

How many Databases can I open? (2003) Tcp Connect and the disappearing page (2000) Waitfor file (2000) shownext & math (1997) emailer settings and control questions (1997) Order not created error (never mind) (1997) Frames and WebCat (1997) serial number not working (1998) What about that Cc and Bcc bug? (2000) WebCatalog Beta Documentation (1997) Fun with Dates (syntax) (2002) Questions (1998) [shipCost] math formula? (1997) Pithy questions on webcommerce & siteedit (1997) Quit revisited (1997) [BULK] [WebDNA] Anyone using Ubuntu 17.04 yet? (2017) [ShowNext] (1997) Sherlock and WebCat-2 (1998) format and math on the fly (1998) Expert tech support -- a fast and simple solution (long) ... (2000)