[thelist] dynamic tables

Wayne Douglas wayne at freelance-developer.co.uk
Thu May 12 00:52:41 CDT 2005


Is this PHP or ASP or what? I have an ASP function that will display all of the results set in a table, including column names etc, doesn't look very pretty, but that's for you to play with, let me know if you want it. It loops through the columns first getting the column names, build the first row of the table using the column names and then loops through the data, building the rest of the table. So its capable of displaying any record set of any size. I use it for debugging old ASP 3.0 code...
 
w
 

________________________________

From: thelist-bounces at lists.evolt.org on behalf of Stephane Deschamps
Sent: Wed 11/05/2005 18:00
To: thelist at lists.evolt.org
Subject: Re: [thelist] dynamic tables



On 5/10/05, Dena Marchant wrote:
> Hey,  I'm generating dynamic web tables from some database tables.
> In the database I have these variables to build the table below:
> sw14_seq, sw14_distance and sw14_value, the db table has 5 rows.
> It doesn't seem quite right to have part of the information I need dynamic,
> but still have to hard
> code in the table header ("Distance to the Nearest Sensitive Environment")
> and the column headers.
> but I'm not sure the right way to do it in my table design.  There would
> only be one instance of column
> header and I've got multiple instances of distance (in this case).
>
> Can someone suggest the right way to do this?
>
> thanks
>
>       Distance to the Nearest Sensitive Environment
>       Distance (feet) Value
>       = 1,000 12
>       > 1,000 - 2,500 9
>       > 2,500 - 5,000 6
>       > 5,000 - 10,000 3
>       > 10,000 0

What about this :

<table summary="this table will show how many sensitive equipments are
within a distance range">
<caption>Distance to the Nearest Sensitive Environment</caption>

<thead>
 <tr>
  <th id="dist">Distance (feet)</th>
  <th id="val">Number of sensitive envs</th>
 </tr>
</thead>
<tbody>
(... here a loop on your query results...)
 <tr>
  <td headers="dist">$dist</td>
  <td headers="val">$val</td>
 </tr>
(... end loop...)
</tbody>
</table>

What do you think? Or did I misunderstand your question?
--
Stephane Deschamps
personal: http://nota-bene.org/
org: http://evolt.org/
french org: http://pompage.net/
--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list