$result=$db->query("SELECT * FROM {$gtablepre}winners WHERE gid='$gnum' LIMIT 1");
...
...
@@ -23,50 +22,148 @@ if($command == 'info') {
$hnewsinfo=readover($hnewsfile);
}
}else{
$download_button=[];
$max_gamenum=0;
$result=$db->query("SELECT gid FROM {$gtablepre}winners ORDER BY gid DESC LIMIT 1");
if($db->num_rows($result)){
$tmp_rst=$db->fetch_array($result);
$max_gamenum=$tmp_rst['gid'];
}
//$start预处理
if(!isset($start)||!$start){
$result=$db->query("SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners ORDER BY gid desc LIMIT $winlimit");
}else{
$result=$db->query("SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners WHERE gid<='$start' ORDER BY gid desc LIMIT $winlimit");
$query_limit="SELECT gid,name,nick,icon,gd,wep,wmode,teamID,teamMate,teamIcon,getime,motto,hdp,hdmg,hkp,hkill FROM {$gtablepre}winners $query_where ORDER BY gid DESC LIMIT $winlimit";