Hi!! I have a simple script of displaying client work history in following manner:

<?PHP

$query1=mysql_query

("SELECT 

existing_clients_work_history.history_description, 

existing_clients_work_history.history_history, 

client_master.client_name  

FROM 

existing_clients_work_history 

INNER JOIN 

client_master 

ON

existing_clients_work_history.client_id=client_master.client_id");

if(mysql_num_rows($query1) > 0)

{

echo "<table align='center' border='0' width='1000'>";

echo "<tr class='style1' align='center'>

<td>Client Name</td>

<td>Work Description</td>

<td>Work History</td>

</tr>";

while($row1=mysql_fetch_array($query1))

{

if($row1!=0)

{

echo "<tr>

<td class='style3'>"; echo $row1['client_name']; echo "</td>

<td class='style3'>"; echo $row1['history_description']; echo "</td>

<td class='style3'>"; echo $row1['history_history']; echo "</td>

</tr>";

}

}

echo "</table>";

}

else

{

echo "<div align='center' class='style1'>Sorry No Records Found..</div>";

}

?>

Problem is, there are multiple records belonging to same client.Is there any way out if I want to display client name only once & their records afterwards??

maybe you can use distinct in mysql

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.