while ($row =mysql_query($result)) ????????
<?php
include("conn_bd.php");
$sql="select * from table";
$result_res=mysql_query($sql) or die(mysql_error());
print "<table border=\"1\">";
if(mysql_num_rows($result_res)>0)
{
while($rows_res=mysql_fetch_assoc($result_res))
{
/* here comes the printed values*/
print "<tr>";
echo "<td>". ( empty($rows_res["brandName"]) ? " " : $rows_res["brandName"] )."</td>";
echo "<td>". ( empty($rows_res["model"]) ? " " : $rows_res["model"] )."</td>";
echo "<td>". ( empty($rows_res["modYear"]) ? " " : $rows_res["modYear"] )."</td>";
echo "<td>". ( empty($rows_res["regCity"]) ? " " : $rows_res["regCity"] )."</td>";
echo "<td>". ( empty($rows_res["demand"]) ? " " : $rows_res["demand"] )."</td>";
print "</tr>";
}
print "</table>";
}
else
echo "No result in res table ...";
?>
Last edited by djjjozsi; Jun 16th, 2009 at 10:07 am.
Reputation Points: 12
Solved Threads: 11
Junior Poster in Training
Offline 69 posts
since Jun 2009