Hi, i have product name which is common for all product type. I am trying to display data in table from database, product name should come as a single row. Pls help me to solve this problem
i would like to display like this
[code=html]<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
</head>
<body>
<table width=”620″ border=”1″>
<tr>
<td width=”130″>Product Name </td>
<td width=”143″>Product Type</td>
</tr>
<tr>
<td>Coated </td>
<td>Silk</td>
</tr>
<tr>
<td></td>
<td>Gloss </td>
</tr>
<tr>
<td></td>
<td>Cast Coated </td>
</tr>
<tr>
<td></td>
<td>Matt </td>
</tr>
<tr>
<td></td>
<td> Part Mechanical </td>
</tr>
<tr>
<td></td>
<td> Gloss Digital </td>
</tr>
<tr>
<td></td>
<td> Silk Digital </td>
</tr>
<tr>
<td></td>
<td> Gloss One Sided </td>
</tr>
</table>
</body>
</html>
Here is my code
[code=php]<?php
include(‘config.php’);
$query= “select * from jos_list where category_id=’43’ “;
$result = mysql_query($query);
$Cat = mysql_query(“Select * from jos_list_categories where id=’43′”);
$Cat_Row = mysql_fetch_array($Cat);
?>
<table border=”1″>
<tr>
<td>Product Name</td>
<td>Product Type</td>
</tr>
<?php
while($row=mysql_fetch_array($result))
{
?>
<tr>
<td><?php echo $Cat_Row[‘title’]?></td>
<td><?php echo $row[‘title’];?></td>
</tr>
<?php
}
?>
</table>