#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    6
    Rep Power
    0

    Question Cfloop picture gallery


    Hello ..

    There is much about it but nothing seems to work as I are seeking.

    trying to get to a cfloop TABLE to work smart to use in slightly different places.

    What I try is to create items: a table that loops 10 entries and display them 5 and 2. That is, 5 to one side and the 2 rows.

    Code:
    <cfparam name="PageNum_testrec" default="1">
    <cfquery name="testrec" datasource="FamLundDB2k">
    SELECT *
    FROM tblOnskelista 
    </cfquery>
    <cfset MaxRows_testrec=10>
    <cfset StartRow_testrec=Min((PageNum_testrec-1)*MaxRows_testrec+1,Max(testrec.RecordCount,1))>
    <cfset EndRow_testrec=Min(StartRow_testrec+MaxRows_testrec-1,testrec.RecordCount)>
    <cfset TotalPages_testrec=Ceiling(testrec.RecordCount/MaxRows_testrec)>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Namnlöst dokument</title>
    </head>
    
    <body>
    <cfoutput query="testrec" startRow="#StartRow_testrec#" maxRows="#MaxRows_testrec#">
     
     <table width="100" border="1">
        <tr>
          <td>#testrec.tblOnskelista#</td>
        </tr>   
      </table>
    </cfoutput>
    </body>
    </html>
    now I want to have tables that appear in two rows. 5 in each row
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,273
    Rep Power
    968
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    6
    Rep Power
    0

    allmost :)


    Originally Posted by kiteless
    Use the MOD operator. http://tinyurl.com/767e9hq
    thank you very much. but is not the entire table, just a columns. since I lack the ability to create a distance between. for possible advertisements. But finally we have it in an easily way.
    First part solved

    but how do you get to space
    12345
    space writable
    678910

IMN logo majestic logo threadwatch logo seochat tools logo