Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display records from a Database - extremely important

Status
Not open for further replies.

NEL3644

Technical User
Sep 4, 2000
26
US
Hi everyone,

On my Database, I have a table that looks like this:

ID First Name Last Name
-------------------------
1 Joe Morgan
2 Juan Martinez
3 Michael Porras
4 Brian Clark
5 Chris Clinton
6 Michelle Hwa
7 .... .....
8 .... .....
9 .... .....


Now, I want to be able to display the records in 2 tables so that it looks like this:

ID First name Last name ID First name Last name
1 Joe Morgan 4 Brian Clark
2 Juan Martin 5 Chris Clinton 3 Michael Porras 6 Michelle Hwa

Can anyone please help me? This is extremely important...

Thanks. [sig][/sig]
 
Try something like:
Code:
<CFQUERY DATASOURCE=&quot;mydb&quot; NAME=&quot;Employees&quot;>
SELECT ID, FirstName, LastName
FROM Employees
</CFQUERY>

<TABLE>
<TR>
  <TD>ID</TD>
  <TD>First Name</TD>
  <TD>Last Name</TD>
  <TD>ID</TD>
  <TD>First Name</TD>
  <TD>Last Name</TD>
</TR>

<TR>
<CFOUTPUT QUERY=&quot;Employees&quot;>
  <TD>#ID#</TD>
  <TD>#FirstName#</TD>
  <TD>#LastName#</TD>
  <CFIF currentrow MOD 2 IS 0></TR></CFIF>
</CFOUTPUT>
</TR>
</TABLE>
Hope this helps... [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top