aliashippysmom
Programmer
Hello! I have 1 table in my database with a column called NewsType. This column can take on one of two values: Workforce or UI. I want to pull data from the column based on this column and display it on the web page in a tabular format. The first column of the table must contain only data with the NewsType of Workforce. The second column must contain data with the NewsType of UI.
I am doing it like this:
The problem is the description field can vary in length, so the rows and columns look askew:
My Workforce Story 1, My UI Story 1
Source 1 Source 2
Desc 1 This is the desc Desc 2 This is antohre desc
This one is longer
IT goes on here... My UI Story 2
Source 3
My Workforce Story 2 Description of this story
Source 4 More description
Etc.
How can I make it line up? Usually with just one query I do the MOD thing which works o.k.
I hope this makes sense and thanks!
I am doing it like this:
Code:
<cfquery name="getWorkforce" datasource="myDSN">
select title, source, description, newsType from myTable
where newsType = 'workforce'
</cfquery>
<cfquery name="getUI" datasource="myDSN">
select title, source, description, newsType from myTable
where newsType= 'ui'
</cfquery>
<table>
<tr>
<td>
<cfoutput query="getWorkforce">
#title#<br>#source#<br>#description#<br><br>
</cfoutput>
</td>
<td>
<cfoutput query="getUI">
#title#<br>#source#<br>#desciption#<br><br>
</cfoutput>
</td>
</tr>
</table>
The problem is the description field can vary in length, so the rows and columns look askew:
My Workforce Story 1, My UI Story 1
Source 1 Source 2
Desc 1 This is the desc Desc 2 This is antohre desc
This one is longer
IT goes on here... My UI Story 2
Source 3
My Workforce Story 2 Description of this story
Source 4 More description
Etc.
How can I make it line up? Usually with just one query I do the MOD thing which works o.k.
I hope this makes sense and thanks!