RE: [WebDNA] Basic Search
This WebDNA talk-list message is from 2008
It keeps the original formatting.
numero = 100093
interpreted = N
texte = It's up to you. I find the simpler use of [math]=20is less prone to typos, as there just just less=20code. You don't need show=3Df with text variables,=20but you do with math, if you don't want the=20result to display on the webpage. As with a text=20var, [hitcount] is all you need to retrieve the=20math variable.TerryShould I change the text variable to a math=20variable as just suggested? And do I need the=20show=3Df in it?Mike=46rom: Michael A. DeLorenzo [mailto:michael@oldecarriage.com]Sent: Tuesday, July 01, 2008 9:54 AMTo: talk@webdna.usSubject: RE: [WebDNA] Basic SearchOK almost there but something is duplicating things. Here is the code so far==2ENot that I am trying to do this in an embedded=20search. The first search goes into my database=20which holds my pages, each of which has a unique=20sku and fides all of the pages. The next search=20takes the sku of each page and searches the log=20file and tries to summarize the number of hits to=20that page (identified by sku) but the final count=20for each page can not include the hits from any=20ip address beginning with 192, thus the hideif.[text]hitcount=3D0[/text][search db=3D../dbs/oldecarriage.db&neskudatarq=3D0] [founditems] [sku] has had [search db=3DlistingsLog.db&eqskudatarq=3D[sku]] [founditems]=20[hideif=20[ipaddress]~192][text]hitcount=3D[math][hitcount]+1[/math][/text][/hideif] [/founditems] [/search] [hitcount] page views.
[/founditems][/search]Here are the results=20
http://72.24=2.199.250/oldecarriage/logs/listingsLogSummary.tplMichael A. DeLorenzoWeb: www.oldecarriage.com=46rom: Charles Kline [mailto:ckline@rightcode.net]Sent: Tuesday, July 01, 2008 9:37 AMTo: Subject: Re: [WebDNA] Basic Searchuse a counter. if you give a little more detail I=20can give better advice, but you could do like...[math]counter=3D0[/math][search][founditems][math]counter=3Dcounter+1/math[][/founditems][/search--Charles Klineckline@rightcode.nethttp://www.rightcode.netOn Jul 1, 2008, at 9:29 AM, "Michael A.=20DeLorenzo"=20<michael@oldecarriage.com>=20wrote:But then the numfound number will be incorrect. Any other ideas?Michael A. DeLorenzowww.oldecarriage.com=46rom: Charles Kline [mailto:ckline@rightcode.=net]Sent: Tuesday, July 01, 2008 9:21 AMTo: <talk@webdna.us>Subject: Re: [WebDNA] Basic SearchI'd just filter the results. Just use a hideif.--Charles Kline<>ckline@rightcode.net<>http://www.rightcode.netOn Jul 1, 2008, at 8:53 AM, "Michael A.=20DeLorenzo" <<>michael@oldecarriage.com> wrote:Hi all,I have not used WebDNA for a while (but damn glad=20to be back) and have stumbled into a roadblock.I have a custom log file and I am trying to=20summarize the number of hits to a single page but=20wish to exclude all the recorded hits from any ip=20address beginning with 192. I know I can do it=20with math but isn=B9t there an easier way.=20Something along the lines of:[search db=3DLog.db&eqskudatarq=3D[sku]&neipaddressbw=3D192] [numfound][/search]Thanks for any help you may have to offer.Mike-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Associated Messages, from the most recent to the oldest:
It's up to you. I find the simpler use of [math]=20is less prone to typos, as there just just less=20code. You don't need show=3Df with text variables,=20but you do with math, if you don't want the=20result to display on the webpage. As with a text=20var, [hitcount] is all you need to retrieve the=20math variable.TerryShould I change the text variable to a math=20variable as just suggested? And do I need the=20show=3Df in it?Mike=46rom: Michael A. DeLorenzo [mailto:michael@oldecarriage.com]Sent: Tuesday, July 01, 2008 9:54 AMTo: talk@webdna.usSubject: RE: [WebDNA] Basic SearchOK almost there but something is duplicating things. Here is the code so far==2ENot that I am trying to do this in an embedded=20search. The first search goes into my database=20which holds my pages, each of which has a unique=20sku and fides all of the pages. The next search=20takes the sku of each page and searches the log=20file and tries to summarize the number of hits to=20that page (identified by sku) but the final count=20for each page can not include the hits from any=20ip address beginning with 192, thus the hideif.[text]hitcount=3D0[/text][search db=3D../dbs/oldecarriage.db&neskudatarq=3D0] [founditems] [sku] has had [search db=3DlistingsLog.db&eqskudatarq=3D[sku]] [founditems]=20[hideif=20[ipaddress]~192][text]hitcount=3D[math][hitcount]+1[/math][/text][/hideif] [/founditems] [/search] [hitcount] page views.
[/founditems][/search]Here are the results=20http://72.24=2.199.250/oldecarriage/logs/listingsLogSummary.tplMichael A. DeLorenzoWeb: www.oldecarriage.com=46rom: Charles Kline [mailto:ckline@rightcode.net]Sent: Tuesday, July 01, 2008 9:37 AMTo: Subject: Re: [WebDNA] Basic Searchuse a counter. if you give a little more detail I=20can give better advice, but you could do like...[math]counter=3D0[/math][search][founditems][math]counter=3Dcounter+1/math[][/founditems][/search--Charles Klineckline@rightcode.nethttp://www.rightcode.netOn Jul 1, 2008, at 9:29 AM, "Michael A.=20DeLorenzo"=20<michael@oldecarriage.com>=20wrote:But then the numfound number will be incorrect. Any other ideas?Michael A. DeLorenzowww.oldecarriage.com=46rom: Charles Kline [mailto:ckline@rightcode.=net]Sent: Tuesday, July 01, 2008 9:21 AMTo: <talk@webdna.us>Subject: Re: [WebDNA] Basic SearchI'd just filter the results. Just use a hideif.--Charles Kline<>ckline@rightcode.net<>http://www.rightcode.netOn Jul 1, 2008, at 8:53 AM, "Michael A.=20DeLorenzo" <<>michael@oldecarriage.com> wrote:Hi all,I have not used WebDNA for a while (but damn glad=20to be back) and have stumbled into a roadblock.I have a custom log file and I am trying to=20summarize the number of hits to a single page but=20wish to exclude all the recorded hits from any ip=20address beginning with 192. I know I can do it=20with math but isn=B9t there an easier way.=20Something along the lines of:[search db=3DLog.db&eqskudatarq=3D[sku]&neipaddressbw=3D192] [numfound][/search]Thanks for any help you may have to offer.Mike-- Terry Wilson | terry@terryfic.com | http://terryfic.comhttp://WhosComing.com - a simplified, affordable online reservation systemhttp://TightJacket.com -- stylish protection for your laptop--------------------------------------------------------------------------Attitude is the only difference between ordeal and adventure.
Terry Wilson
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:
Safari browser and WebDNA set-cookies (2003)
matching shipto and others (1998)
WebCat2b13MacPlugIn - [showif][search][/showif] (1997)
founditem align (1998)
authenticating a second user (1997)
Newbie needs advice to learn to use WebDNA (2003)
WebCatalog can't find database (1997)
Error 551 in Emailer (2000)
Calculating Shipping (1997)
Database Repopulation (2004)
problems with 2 tags shakur (1997)
$Quit, $CloseDatabase corrections (1997)
Shopping carts and reloading pages (1997)
Summing fields (1997)
WebCat2.0 [format thousands .0f] no go (1997)
Database cloning, or possible hack? (2003)
Header info in content (1998)
really wierd date stuff on NT (1997)
TeaRoom Order fields email account remain empty even though thewy are filled. (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)