[thelist] dynamic tables

Stephane Deschamps stephane.deschamps at gmail.com
Wed May 11 12:00:17 CDT 2005


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/


More information about the thelist mailing list