這裏就是我試圖做排序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