#foo#
[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => jdeline [ip] => jdeline@deline. [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => [isfirstshown] => [attachments] => [allattachments] => ) --> Database Display - How can I repete the rows both ways? - Coldfusion Database Access

Database Display - How can I repete the rows both ways? - Coldfusion Database Access

I am able to display my database on my webpages either all vertically one after another ( after using the repete region feature ) or all Horizontally - What i want to do is my data to be displayed horizontally in my table ( 3 spaces ) and then go down to the next row and then display 3 more and then same thing over and over ??? can anyone help me>...

  1. #1

    Default Database Display - How can I repete the rows both ways?

    I am able to display my database on my webpages either all vertically one after
    another ( after using the repete region feature ) or all Horizontally - What i
    want to do is my data to be displayed horizontally in my table ( 3 spaces )
    and then go down to the next row and then display 3 more and then same thing
    over and over ??? can anyone help me>

    heartless Guest

  2. #2

    Default Re: Database Display - How can I repete the rows bothways?

    You need to create a table that will contain three cells per row. Run a
    counter to let you know when you have written the third cell, then create a new
    row. See concept code below.

    <CFQUERY NAME="getStuff" ... >
    SELECT foo FROM myTable WHERE ...
    </CFQUERY>

    <!--- initialize the cell counter --->
    <CFSET i = 0>
    <TABLE>
    <CFOUTPUT QUERY="getStuff">
    <CFIF i MOD 3 IS 0>
    <TR>
    </CFIF>
    <TD>#foo#</TD>
    <CFSET i = i + 1>
    <CFIF i MOD 3 IS 0>
    </TR>
    </CFIF>
    </CFOUTPUT>
    </TABLE>

    jdeline Guest

  3. #3

    Default Re: Database Display - How can I repete the rows bothways?

    Right general idea but the specifics need a bit of work. First, you can use
    the currentrow variable to decrease the amount of code you use.

    More importantly, you have to make sure you always have an opening <tr> tag,
    so it goes before the cfouput tag. Plus you have ensure you always have a
    closing tag.

    Something like
    <table><tr>
    <cfoutput query ="abc">
    <td>#xyz#</td>
    <cfif currentrow mod 3 is 0>
    </tr><tr>
    <cfif>
    </cfoutput>
    </tr>
    </table>

    Dan Bracuk Guest

  4. #4

    Default Re: Database Display - How can I repete the rows bothways?

    Thank you both! I will Try thsi and let you know how i did ....
    :-)
    heartless Guest

Similar Threads

  1. Replies: 3
    Last Post: October 5th, 04:43 AM
  2. PHP database site - lots of files!! - Any better ways?
    By Chris Morley in forum PHP Development
    Replies: 0
    Last Post: September 26th, 04:44 PM
  3. Display 1 data row as multiple datagrid rows
    By Craig Banks in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: February 21st, 09:25 AM
  4. Display SQL rows by certain field?
    By George Remus in forum PHP Development
    Replies: 3
    Last Post: December 1st, 06:48 PM
  5. Replies: 2
    Last Post: July 30th, 06:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •