• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

grids, cells, for my query output

Explorer ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

hi i have this query that will display result.
i need to put it in a record like results with ( being in a cell) in html
what do i have to add here. to make this happen?

columns being in a cell and rows and records within that columns too??


<cfquery name="Myqueryname"
datasource="#Request.MainDSN#">
SELECT
CompanyID,
CompanyName,
Address,
City,
State,
ZipCode,
Comments
FROM
Company
ORDER BY
CompanyName ASC
</cfquery>

<html>
<head>
<title>CF TUTORIALS</title>
<link rel="stylesheet" href="styles.css">
</head>

<body>

<h1>All CO Listings</h1>

<table>
<tr>
<td><b>ID</b></td>
<td><b>Name</b></td>
<td><b>Address</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>ZIP Code</b></td>
<td> </td>
</tr>
<cfoutput query="Myqueryname">
<tr>
<td>#CompanyID#</td>
<td>#CompanyName#</td>
<td>#Address#</td>
<td>#City#</td>
<td>#State#</td>
<td>#ZipCode#</td>
<td>
<a href=" ALL Emps.cfm?CompanyID=#CompanyID#">ALL Emps</a>
<a href=" AddCO Form.cfm">AddCO</a>
<a href=" Editco.cfm?CompanyID=#CompanyID#">Editco</a>
<a href="CoDeleteForm.cfm?CompanyID=#CompanyID#">Delete</a>
</td>
</tr>
</cfoutput>
</table>

</body>
</html>
TOPICS
Advanced techniques

Views

414

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 10, 2006 May 10, 2006
Your code looks good. What's wrong with the results that you get?

Votes

Translate

Translate
LEGEND ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

Your code looks good. What's wrong with the results that you get?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 10, 2006 May 10, 2006

Copy link to clipboard

Copied

LATEST
try adding

<TABLE width=100% align="left" border="4" rules="all">

and re place table.
i did on my tutorial.

but it did not work.

but try it on your program...
it might work

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation