HTML Tables

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Amie

    HTML Tables

    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

    #2
    Re: HTML Tables

    On Aug 19, 9:33 am, Amie <sthembileng... @gmail.comwrote :
    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?
    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?
    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?
    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?
    If anyone can, can you roughly show me how
    to go about doing this.
    Thanks in advance
    >
    Amie

    Comment

    • Stefan Behnel

      #3
      Re: HTML Tables

      Amie wrote:
      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:



      Try something like this:

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

      html_body = E.BODY( *tables )

      Stefan

      Comment

      Working...