<?
$sqlm_cui="SELECT MemberID,COUNT(MemberID) AS cnt FROM rentdetail GROUP BY MemberID ORDER BY cnt DESC LIMIT 1 ";
$mcui_query = mysql_query($sqlm_cui);
$mcui=mysql_fetch_array($mcui_query);
$maxcu_id=$mcui["MemberID"];
?>
<?
$sqlm_cui="SELECT MemberID,COUNT(MemberID) AS cnt FROM rentdetail WHERE 1 AND (MemberID BETWEEN 10 AND 20) GROUP BY MemberID ORDER BY cnt DESC LIMIT 1 ";
$mcui_query = mysql_query($sqlm_cui);
$mcui=mysql_fetch_array($mcui_query);
$maxcu_id=$mcui["MemberID"];
?>