Ask a Question related to Coldfusion Database Access, Design and Development.
-
heartless #1
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
-
how to display data in 3 columns by 4 rows format
All, I will be eternally greatful if someone can provide snippet of code, URL or reference material that shows how to display data in a "n... -
PHP database site - lots of files!! - Any better ways?
Hi, im writing my first proper PHP site for ordering services online. The problem I'm finding is that I am ending up with loads of different... -
Display 1 data row as multiple datagrid rows
If a row of data in a dataset has a lot of columns the row displaying the data in a datagrid will run way off the screen. What I'd like to do is... -
Display SQL rows by certain field?
I have a SQL database that contains the fields "author," "title," and "category." I want to create a web page that sorts the entries by... -
Skript problem / display in 3 rows
Hi, if a problem wiht the folowing script. i would like to diplay the results in tree rows, and i have no idea where to do this in the script. I... -
jdeline #2
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
-
Dan Bracuk #3
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
-
heartless #4
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



Reply With Quote

