$sql= "select * from t_datestudy where id='4750' and agreemode='2' and school_agree !='1'";       
    $result = mysql_query($sql,$connection);
    $app = mysql_fetch_array($result);
    mysql_free_result($result);
    $dt1 = $app['CDATE'] . ' ' . $app['START_TIME'] ;
    $dt2 = date('Y-m-d H:i:s',strtotime('+2 Hour'));
    if ($dt2 > $dt1)
        echo "exceed";
    else
        echo "ok";