Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello, Fellow Monks! I have been racking my brain, trying to do something, but cannot get it figured out(in my head). Can you please offer me some advise...

header cell1 header cell2
content cell1 content cell2


I am pulling data out of a MySQL database, and in a while statement I'm putting the information in a table.

The problem is that, as you know, in the WHILE statment, I only have 1 "database row" to work with at a time and the format of a table requires 2 cells side by side: <td></td><td></td>Before the new row. Of course you already know that.

How can I get that information to "content cell1", without knowing the 'header' for "header cell2"?

In other words, if I am on record 1, and I need the header(name) in "header cell1" and the content for "content cell1" but before I can get to "content cell1", I have to create "header cell2". Do you see what I'm trying to do? I often cannot explain things the way I mean them, I'm told by my wife ;o)

If you don't understand, please reply back, and I'll try to explain it better.

thx,
Richard

In reply to Printing Tables... by powerhouse

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found