這個MySQL查詢有什麼問題?子查詢中的MySQL語法錯誤
$result = mysql_query("SELECT did FROM publications where group IN
(SELECT s_group FROM subscriptions where uid1='$id')") or die(mysql_error());
我得到語法錯誤:
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 's_group FROM
subscriptions where uid1='34846')' at line 1
由於[語法錯誤的可能重複在MySQL中使用保留字作爲表或列的名稱](http://stackoverflow.com/questions/23446377/syntax-error-due-to-using-a-reserved-word-as-a-table-or -column-name-in-mysql) –