'$now_date' "; $sql.= "order by DSP_DATE desc"; $rtn = mysql_query( $sql, $con); //echo $sql; //if(mysql_num_rows($rtn)>5) $max= 5; //else $max = mysql_num_rows($rtn); $max = mysql_num_rows($rtn); ?>