close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Use Data as column header in table?

Thread began 4/19/2012 10:27 am by gary.brett434358 | Last modified 4/26/2012 4:39 am by gary.brett434358 | 627 views | 2 replies |


Use Data as column header in table?

Hi there, I have created a DA page to show results of a small table containing Name,Month, Cases as such:

<table border="1" cellpadding="1" cellspacing="1">
<th scope="col">Name</th>
<th scope="col">Month</th>
<th scope="col">Cases</th>
<?php do { ?>
<td><?php echo $row_rsChart2['ContactFullName']; ?></td>
<td><?php echo $row_rsChart2['Month']; ?></td>
<td><?php echo $row_rsChart2['Cases']; ?></td>
<?php } while ($row_rsChart2 = mysql_fetch_assoc($rsChart2)); ?>

Is it possible I could use the month columns as a header,displaying Jan, Feb, March etc from left to right in column header and cases for each month as data?

Jan - Feb - Mar
User1 100 47 89
user2 86 67 134

With the default layout it displays as:

Name - Month - Cases
User1 Jan 100
User1 Feb 47
User2 86 67

Any advice much appreciated..


Sign in to reply to this post

Jason ByrnesWebAssist

this would require hand coding to achieve and is not supported.

you would need to set the recordset to order by the month

Then in the repeat region add code to set a variable that contains the current month and create the first header.

on writing the next record, compare the month stored in the variable to see if they are the same or different. if different, crete a new heading and reset the variable value.

Sign in to reply to this post


Thanks Jason, as I thought way above my expertise, but I may have a crack anyway.


Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...