这里就是我试图做排序MySQL表
{
{
$sql="SELECT ISO_id,gdp,population,country_name,gold,silver,bronze,total FROM Country ORDER BY (46034/($_GET["x"]*bronze)+($_GET["y]*silver]+(z*gold)*(gdp/population))"; // chosen to order my html table with the number the medals each country won at the olympics
}
}
但是我不知道如何包含语句中的$ _GET
有一个SQL注入可能与您的查询。改用[准备好的陈述](http://bobby-tables.com/php.html)。 – 2013-05-10 14:44:00
您应该为此准备好一个语句,并绑定$ _GET值。 – andrewsi 2013-05-10 14:44:05
你必须在ORDER BY语句后加上一个列名,我不知道你在这里试着做 – Nagasaki 2013-05-10 14:45:29