echo "<table>";
$sql = mysql_query("select name from table group by name order by name");
while($rs = mysql_fetch_array($sql))
{
echo "<tr><td colspan='5'>".$rs['name']."</td><tr>";
echo "<tr><td>D1</td><td>D2</td><td>D3</td><td>D4</td><td>D5</td><tr>";
$sql2 = mysql_query("select * from table where name=".$rs['name']." order by field");
while($rs2=mysql_query($sql2))
{
echo "<tr><td>".$rs2['field1']."</td><td>".$rs2['field2']."</td><td>".$rs2['field3']."</td><td>".$rs2['field4']."</td><td>".$rs2['field5']."</td><tr>";
}
}
echo "</table>";
function select_sizing()
{
//$this->checklogin->check();
$this->db->select('c.size_id,c.name,c.position,c.business_unit,u.reference_number,
i.d1,i.d2,i.d3,i.d4,i.d5,i.d6,i.d7,i.d8,i.d9,i.d10,
t.d1 as t1,t.d2 as t2,t.d3 as t3,t.d4 as t4,t.d5 as t5,
t.d6 as t6,t.d7 as t7,t.d8 as t8,t.d9 as t9,t.d10 as t10');
$this->db->from('size_chart_use u');
$this->db->join('size_chart c', 'u.`size_id`=c.`size_id`');
$this->db->join('size_chart_item i', 'i.`size_id`=c.`size_id`');
$this->db->join('size_chart_titel t', 't.`size_id`=c.`size_id`');
$this->db->where('u.reference_number', 'A3D/103L');
$query = $this->db->get();
$data['QrySiZing'] =$query;
$this->load->view('frmOrderFormSelectSizing.php',$data);
}