Re: [WebDNA] limit found per row

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 107500
interpreted = N
texte = sgbc cebu, Now you have a few examples.. but here this one (below) will fill out = the blank 's the way you asked it to.. and also allow you to change = the number of items per row, at the top of the code. The second setting = ([numSampleImages]), is just for populating the test database (I used a = [table]). Open the below on your webdna webserver. (Add the comment at the top to = make webdna parse the page, if your setup is set to require that.) -G = --------------------------------------------------------------------------= ------------------------------------------------------------- [text]numItemsPerTR=3D7[/text] [text]numSampleImages=3D22[/text] [table name=3DcebuSample&fields=3Dimage][/table] [loop start=3D1&end=3D[numSampleImages]&advance=3D1] [Append table=3DcebuSample]image=3Dimage[index].jpg[/Append] [/loop]  Untitled  [!]---This does not complete the TR when there are a number of = founditems which is not divisible by 3       [search table=3DcebuSample&neimagedata=3DfindAll]  [founditems]  [showif [index]\3]  [/showif] [/founditems]  [/search] 
ABC
[image]
---[/!] [!]---this will fill out the last with the right number of = these: "   " ...as was requested.---[/!]       [Search = table=3DcebuSample&neimagedatarq=3DfindZemAll[!]---&asimagesort=3D1---[/!]= &rank=3Doff] [text]totalItems=3D[numfound][/text] [FoundItems] [showif [index]=3D1]  [text]TRstatus=3Dopen[/text] [text]TDsThisTR=3D0[/text] [/showif] = [text]TDsThisTR=3D[math][TDsThisTR]+1[/math][/text]  [showif [index]\[numItemsPerTR]]  [text]TRstatus=3Dclosed[/text] [hideif [index]=3D[totalItems]]  = [text]TRstatus=3Dopen[/text] [text]TDsThisTR=3D0[/text]= [/hideif] [/showif] [/FoundItems] [if ("[TRstatus]"=3D"open")] [then] [!]---here we fill in any empty = TD slots with blanks, and close the TR---[/!] = [text]numBlanksTDsNeeded=3D[math][numItemsPerTR]-[TDsThisTR][/math][/text]= [loop = start=3D1&end=3D[numBlanksTDsNeeded]&advance=3D1]  [/loop]  [/then] [/if] [/Search] 
ABC
=  
= --------------------------------------------------------------------------= -------------------------------------------------------------= Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] limit found per row (sgbc cebu 2011)
  2. Re: [WebDNA] limit found per row (sgbc cebu 2011)
  3. Re: [WebDNA] limit found per row (Govinda 2011)
  4. Re: [WebDNA] limit found per row (Paul Willis 2011)
  5. Re: [WebDNA] limit found per row (Dan Strong 2011)
  6. Re: [WebDNA] limit found per row (Paul Willis 2011)
  7. Re: [WebDNA] limit found per row (Donovan Brooke 2011)
  8. Re: [WebDNA] limit found per row (sgbc cebu 2011)
  9. Re: [WebDNA] limit found per row (Paul Willis 2011)
  10. Re: [WebDNA] limit found per row (Govinda 2011)
  11. Re: [WebDNA] limit found per row (William DeVaul 2011)
  12. [WebDNA] limit found per row (sgbc cebu 2011)
sgbc cebu, Now you have a few examples.. but here this one (below) will fill out = the blank 's the way you asked it to.. and also allow you to change = the number of items per row, at the top of the code. The second setting = ([numSampleImages]), is just for populating the test database (I used a = [table]). Open the below on your webdna webserver. (Add the comment at the top to = make webdna parse the page, if your setup is set to require that.) -G = --------------------------------------------------------------------------= ------------------------------------------------------------- [text]numItemsPerTR=3D7[/text] [text]numSampleImages=3D22[/text] [table name=3DcebuSample&fields=3Dimage][/table] [loop start=3D1&end=3D[numSampleImages]&advance=3D1] [Append table=3DcebuSample]image=3Dimage[index].jpg[/Append] [/loop]  Untitled  [!]---This does not complete the TR when there are a number of = founditems which is not divisible by 3       [search table=3DcebuSample&neimagedata=3DfindAll]  [founditems]  [showif [index]\3]  [/showif] [/founditems]  [/search] 
ABC
[image]
---[/!] [!]---this will fill out the last with the right number of = these: "   " ...as was requested.---[/!]       [Search = table=3DcebuSample&neimagedatarq=3DfindZemAll[!]---&asimagesort=3D1---[/!]= &rank=3Doff] [text]totalItems=3D[numfound][/text] [founditems] [showif [index]=3D1]  [text]TRstatus=3Dopen[/text] [text]TDsThisTR=3D0[/text] [/showif] = [text]TDsThisTR=3D[math][TDsThisTR]+1[/math][/text]  [showif [index]\[numItemsPerTR]]  [text]TRstatus=3Dclosed[/text] [hideif [index]=3D[totalItems]]  = [text]TRstatus=3Dopen[/text] [text]TDsThisTR=3D0[/text]= [/hideif] [/showif] [/FoundItems] [if ("[TRstatus]"=3D"open")] [then] [!]---here we fill in any empty = TD slots with blanks, and close the TR---[/!] = [text]numBlanksTDsNeeded=3D[math][numItemsPerTR]-[TDsThisTR][/math][/text]= [loop = start=3D1&end=3D[numBlanksTDsNeeded]&advance=3D1]  [/loop]  [/then] [/if] [/Search] 
ABC
=  
= --------------------------------------------------------------------------= -------------------------------------------------------------= Govinda

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:

OT: Reverse WHOIS (2003) HTML Editors (1997) Banner DNA (1997) Document Contains No Data! (1997) GuestBook example (1997) problems with 2 tags shakur (1997) Nesting Search Within Tag? (1997) [cart] not being interpreted inside [founditems] (1997) [WebDNA] Libmysql.dll error (2009) WebCatalog 2.1b3 - Plugin or cgi ? (1997) Bug or syntax error on my part? (1997) [include ...] behavior (1997) Bug Report, maybe (1997) PhotoMill -> PhotoMaster (1997) SiteEdit NewFile.html ? (1997) Another bug to squash (WebCat2b13 Mac .acgi) (1997) Bug - 4.5 (2002) Windows 2.1b2 Append Bug? (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) Search/sort in URL Was: GuestBook example (1997)