Ask a Question related to Coldfusion Database Access, Design and Development.
-
alagukannan #1
How to move to next record
Hi,
I am working on an application,that requires the records to be displayed in 2
columns..
So i need something like this..
<tr>
<td>recordsetvalue</td>
<td>nextrecordsetvalue</td>
</tr>
I am not sure how to the next recordset..is there any cursors in coldfusion
through which i can manualy move ot the next record..
Thx
AL
alagukannan Guest
-
How can i retrieve record ONLY From 300 - 400 in amillion Record Table?
HI all Thanks for your time.. I have a question here.. How can i retrieve record ONLY From XXX - XXX in a million Record Table? eg. I have a... -
Move to specific record
hii peeps, what i want to knowe is.. where i can find a extension fore: move to specifi record ore it exist..? greets Ej. -
PHP extension Move to specific record
Hi there, I'm searching for the move to specific record extension for PHP. Does anybody know where to find it? If so... please let me know ... -
move record from 1 table to another table
how can i move info from 1 table to another? I have a table with a form. The table and the form are called customer. I want to move selected... -
Stop adding record in subform after record count = 1
Can someone help in in what to put after the THEN statment to allow one entry if the Record count is =>1 in the Before insert or should I set the... -
alagukannan #2
Re: How to move to next record
Hi,
I am using coldfusion 6.1 mx and oracle 9i.
I am using cfquery tag.
thx
AL
alagukannan Guest
-
SafariTECH #3
Re: How to move to next record
Try using CFLOOP stepping by 2
i.e.
<tr>
<CFLOOP from="1" to="#query.recordcount#" index="ThisLoop" step="2">
<CFOUTPUT>
<td>query.column[ThisLoop]</td>
<td>query.column[ThisLoop + 1]</td>
</CFOUTPUT>
</CFLOOP>
</tr>
You may need to play with it a bit, but it should work.
SafariTECH Guest
-
zoeski80 #4
Re: How to move to next record
Hi AL
You can loop over the whole query and then just close the row and start a new
one after every 2nd record. MOD 2 will return 0 if the value is 2 or 4 as there
is no remainder when dividing by 2 so that is when you want to do the </TR><TR>
bit.
This way you can modify the code to be MOD 3 or MOD 4 to have different number
of columns.
HTH
Zoe
<TR>
<CFLOOP QUERY="QueryName">
<TD>#ColumnOutput#</TD>
<CFIF CurrentRow MOD 2 EQ 0 AND NOT CurrentRow EQ RecordCount> <!--- for
items 2, 4 .. close the ROW tag and start a new row --->
</TR><TR>
</CFIF>
</CFLOOP>
</TR>
zoeski80 Guest
-
alagukannan #5
Re: How to move to next record
HI All,
Thx for helping...
with regards
AL
alagukannan Guest



Reply With Quote

