Connecting Tech Pros Worldwide Help | Site Map

HTML Tables

Amie
Guest
 
Posts: n/a
#1: Aug 19 '08
Hi,
Thanks for your help so far. Ok here's a scenario: I have to create a
site that displays 34 html tables.
In each of these tables the following information has to be displayed:
logo (image), site name, date, time.
Remember: in all of these 34 tables. the information displayed on each
of these tables is retrieved from the database. I did write a mysql
query, I just don't know how to link it with the for loop that has to
display all these tables. If anyone can, can you roughly show me how
to go about doing this.
Thanks in advance


Amie
Mensanator
Guest
 
Posts: n/a
#2: Aug 19 '08

re: HTML Tables


On Aug 19, 9:33*am, Amie <sthembileng...@gmail.comwrote:
Quote:
Hi,
Thanks for your help so far. Ok here's a scenario: I have to create a
site that displays 34 html *tables.
In each of these tables the following information has to be displayed:
logo (image), site name, date, time.
You want 34 tables each with one row?

Or one table with 34 rows?
Quote:
Remember: in all of these 34 tables. the information displayed on each
of these tables is retrieved from the database.
So, you're building a web page dynamically, not static?
Quote:
I did write a mysql
query,
The data you want to display is reurned as a list of tuples?
The logo is a URL that points to the image?
Quote:
I just don't know how to link it with the for loop that has to
display all these tables.
I assume you already have the code to compose the rest of the page?
Quote:
If anyone can, can you roughly show me how
to go about doing this.
Thanks in advance
>
Amie
Stefan Behnel
Guest
 
Posts: n/a
#3: Aug 19 '08

re: HTML Tables


Amie wrote:
Quote:
Thanks for your help so far. Ok here's a scenario: I have to create a
site that displays 34 html tables.
In each of these tables the following information has to be displayed:
logo (image), site name, date, time.
Remember: in all of these 34 tables. the information displayed on each
of these tables is retrieved from the database. I did write a mysql
query, I just don't know how to link it with the for loop that has to
display all these tables. If anyone can, can you roughly show me how
to go about doing this.
This might get you going:

http://codespeak.net/lxml/lxmlhtml.h...-the-e-factory

Try something like this:

tables = []
for row in rows_returned_by_the_query:
tables.append(
E.TABLE( ... )
)

html_body = E.BODY( *tables )

Stefan
Closed Thread