當我刪除AS
子句時,此SQL查詢工作得非常好。MySQL中的語法錯誤:AS語句
$query = "SELECT bd_brushname FROM tbl_brushdescription WHERE MATCH(bd_brushname, bd_brushdescription) AGAINST ('brushes' IN BOOLEAN MODE) AS rank";
$sqlquery = mysql_query($query);
if($sqlquery === FALSE){
die(mysql_error());
}
當我用AS
,它說You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS rank' at line 1
可能有人請告訴我,爲什麼它不工作?
可能重複[MySQL作爲在WHERE語句(http://stackoverflow.com/questions/4611451/mysql-as-in-where-的地方聲明) –