Re: columns
Andy,
That ($row % 2 construct) is used to detect the start and end of the
<tr> tags. So, changing $row$ % 2 to $row % 4 will not do what you
want.
(see how $tr variable is used to detect whether to output <tr> or
</tr>)
To have additional columns, you will have to add the <td></td> pairs
for your extra columns. Please pick up an HTML book to see how tables
are constructed.
<td width="100">
<div align="center">
<a href="productdetail.php?id=<?php echo $row_Recordset1['id'];
?>">
<img src="/user_thumbs/<?php echo $row_Recordset1['file']; ?>"
border="0"></a>
</div>
</td>
<td><?php echo $row_Recordset1['title']; ?>
</td>
<! -- this part is new -->
<td><?php echo $row_Recordset1['columnX']; ?></td>
<td><?php echo $row_Recordset1['columnY']; ?></td>
Thanks,
--Kartic
PS: The code you posted only displays 2 table columns thought it uses 3
columns from your query result.
|