$sum_query = mysql_query("SELECT SUM(OT) AS Total FROM work WHERE Emp_id = '47-001' AND Date_work BETWEEN 2012-09-21 AND 2012-10-21 ") or die (mysql_error());
$sum = ($s = mysql_fetch_assoc($sum_query));
echo "[Overtime] : $s[Total] <br />" ;
$sum_query = mysql_query("SELECT SUM(OT) AS Total FROM work WHERE Emp_id = '47-001' AND Date_work BETWEEN 2012-09-21 AND 2012-10-21 ");
if (!$sum_query){
echo mysql_error();
exit();
}
$s = mysql_fetch_assoc($sum_query);
echo "[Overtime] :".$s[Total] ;