此代码正在检索从其他页面发送的数据:
$data=$DB->quote($_REQUEST['data']);
$playperPosition=$DB->quote($_REQUEST['playperPosition']);
$playerStatictic=$DB->quote($_GET['playerStatictic']);
$league=$DB->quote($_GET['league']);
如何从数据库中选择数据并根据 $playerStatictic 排序
我正在使用此代码,但不起作用:
$i=0;
$sql_playerstatistic="select * from ".$prev."playerstatistic where leagueID = $league ORDER BY $playerStatictic desc";
$re_playerstatistic=$DB->prepare($sql_playerstatistic);
$re_playerstatistic->execute();
while($d_playerstatistic=$re_playerstatistic->fetch(PDO::FETCH_ASSOC))
{
$i++;
$sql_team="select * from ".$prev."team where id=".$d_playerstatistic['teamID']."";
$re_team=$DB->prepare($sql_team);
$re_team->execute();
$d_team=$re_team->fetch(PDO::FETCH_ASSOC);
谢谢,