dynamic table
-
hello, i can seem to get anything to show when using table code – correct me if I am wrong but it should have been a find & replace? I appreciate your help Cheers;
[insert_php] virtual(‘/Connections/VeganProducts.php’); [/insert_php]
[insert_php]
mysql_select_db($database_VeganProducts, $VeganProducts);
$query_rsProductsList = “SELECT * FROM mmw_vProducts ORDER BY prodName ASC”;
$rsProductsList = mysql_query($query_rsProductsList, $VeganProducts) or die(mysql_error());
$row_rsProductsList = mysql_fetch_assoc($rsProductsList);
$totalRows_rsProductsList = mysql_num_rows($rsProductsList);
[/insert_php]<table border=”1″>
<tr>
<td>prodID</td>
<td>prodName</td>
<td>prodCat</td>
<td>allergenSoy</td>
<td>allergenNuts</td>
<td>allergenGluten</td>
<td>knownSupp</td>
<td>substitute</td>
<td>image</td>
<td>confirmedBy</td>
<td>dateAdded</td>
<td>dateUpdated</td>
</tr>
[insert_php] do { ?>
<tr>
<td>[insert_php] echo $row_rsProductsList[‘prodID’]; [/insert_php]</td>
<td>[insert_php]echo $row_rsProductsList[‘prodName’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘prodCat’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘allergenSoy’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘allergenNuts’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘allergenGluten’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘knownSupp’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘substitute’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘image’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘confirmedBy’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘dateAdded’]; [/insert_php]</td>
<td>[insert_php] echo $row_rsProductsList[‘dateUpdated’]; [/insert_php]</td>
</tr>
[insert_php] } while ($row_rsProductsList = mysql_fetch_assoc($rsProductsList)); ?>
</table>[insert_php]
mysql_free_result($rsProductsList);
[/insert_php]
- The topic ‘dynamic table’ is closed to new replies.