Jump to content

Recommended Posts

I am having a problem figuring out how to dynamically populate my table with info from my db. In the past I have been able to do this with tables that only have one DB table row per html table row, but this time I need to have three html table columns each with a row from the db..

 

here is a static example of what I need:

<table width='335' border='0' align='center' cellpadding='2' cellspacing='0' id='nfpcatalog2'>
  <tr>
    <td colspan='2' align="center" valign='top'>$IMAGE1</td>
    <td colspan='2' align="center" valign='top'>$IMAGE2</td>
    <td colspan='3' align="center" valign='top'>$IMAGE3</td>
  </tr>
  <tr>
    <td width="68" valign='top'>$LINK1</td>
    <td width="69" valign='top'>$LINK1a</td>
    <td width="61" valign='top'>$LINK2</td>
    <td width="60" valign='top'>$LINK2a</td>
    <td width="86" valign='top'>$LINK3</td>
    <td width="63" valign='top'>$LINK3a</td>
  </tr>
  <tr>
    <td colspan='2' align="center" valign='top'>$TITLE1</td>
    <td colspan='2' align="center" valign='top'>$TITLE2</td>
    <td colspan='3' align="center" valign='top'>$TITLE3</td>
  </tr>
  <tr>
    <td colspan='2' valign='top'><div align='center'>$PRICE1</div></td>
    <td colspan='2' valign='top'><div align='center'>$PRICE2</div></td>
    <td colspan='3' valign='top'><div align='center'>$PRICE3</div></td>
  </tr>
  <tr>
    <td height="19" colspan='7' valign='middle'><hr /></td>
  </tr>
    <tr>
    <td colspan='2' align="center" valign='middle'>$IMAGE4</td>
    <td colspan='2' align="center" valign='middle'>$IMAGE5</td>
    <td colspan='3' align="center" valign='middle'>$IMAGE6</td>
  </tr>
  <tr>
    <td width="68" valign='top'>$LINK4</td>
    <td width="69" valign='top'>$LINK4a</td>
    <td width="61" valign='top'>$LINK5</td>
    <td width="60" valign='top'>$LINK5a</td>
    <td width="86" valign='top'>$LINK6</td>
    <td width="63" valign='top'>$LINK6a</td>
  </tr>
  <tr>
    <td colspan='2' align="center" valign='top'>$TITLE4</td>
    <td colspan='2' align="center" valign='top'>$TITLE5</td>
    <td colspan='3' align="center" valign='top'>$TITLE6</td>
  </tr>
  <tr>
    <td colspan='2' valign='top'><div align='center'>$PRICE4</div></td>
    <td colspan='2' valign='top'><div align='center'>$PRICE5</div></td>
    <td colspan='3' valign='top'><div align='center'>$PRICE6</div></td>
  </tr>
</table>

 

 

as you can see there are two rows and three columns of products. right now I only have 6 products so everything fits well, but when I add more products I will need to add pagination but I wont open that can of worms until I get this resolved.

 

 

thanks for your help

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.