rendered paste body<?php#include the common configinclude 'config.php';#include open db connection fileinclude 'db.php';#variables...// $query = "SELECT * FROM $table_built ORDER BY $borderby1 $borderby2";$query = "SELECT * FROM $table_built ORDER BY whos, $borderby1 $borderby2";$result = mysql_query($query);#make the table and table header; $items = array();while ($row = mysql_fetch_assoc($result)) { $w = $row['whos']; if (!isset($items[$w])) { $items[$w] = array(); } $items[$w][] = $row;}foreach ($items as $whos => $rows) {echo "<table border=\"1\" cellspacing=\"0\" cellpadding=\"2\" class=\"mmenut\">";echo " <tr> <th>whos</th> <th>h3</th> <th>info</th> <th>partname</th> <th>partnumber</th> <th>partamount</th> <th>partpricepr</th> <th>partshop</th> <th>urlhref</th> <th>urltitle</th> </tr>";#make the result table// while ($row = mysql_fetch_array($result)) {foreach ($rows as $row) { echo "<tr>" . "<td>" .$row['whos'] . "</td>" . "\n" . "<td>" .$row['h3']. "</td>" ."\n". "<td>" .$row['info']. "</td>" ."\n". "<td>" .$row['partname']. "</td>" ."\n". "<td>" .$row['partnumber']. "</td>" ."\n". "<td>" .$row['partamount']. "</td>" ."\n". "<td>" .$row['partpricepr']. "</td>" ."\n". "<td>" .$row['partshop']. "</td>" ."\n". "<td>" .$row['urlhref']. "</td>" ."\n". "<td>" .$row['urltitle']. "</td>"."\n". "</tr>"."\n". "$num";}echo "</table>";}#echo if there is no data to selectif (!$result) {echo "MySQL SELECT FROM * $table_mmenu failed";}#include close db connection fileinclude 'closedb.php';?>