close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

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 | 703 views | 2 replies |

gary.brett434358

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">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Month</th>
<th scope="col">Cases</th>
</tr>
</thead>
<?php do { ?>
<tbody>
<tr>
<td><?php echo $row_rsChart2['ContactFullName']; ?></td>
<td><?php echo $row_rsChart2['Month']; ?></td>
<td><?php echo $row_rsChart2['Cases']; ?></td>
</tr>
</tbody>
<?php } while ($row_rsChart2 = mysql_fetch_assoc($rsChart2)); ?>
</table>



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..

regards

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

gary.brett434358

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

Cheers

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

Content

rating

Layout

rating

Ease of use

rating

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...