$r=0;
while($r<=14)
{
$db = mysql_select_db("datbase_name", $Conn) or die("Disconnect database");
$sql_data="select column_name from table_name where column_name = '$row_code[$r]'and CNT_DATE BETWEEN (CURDATE()-INTERVAL 14 DAY)and (CURDATE()) group by FRATIO,CNT_DATE order by CNT_DATE ASC";
$result_data"เปลี่ยนตามหมายเลข loop"=mysql_query($sql_data,$Conn);
$r++;
}