我不熟悉PHP,甚至更新PHP與MS SQL,而不是MySQL。在做了一些研究之後,我想出了可以被視爲分頁查詢的用法,但顯然我在某處出錯,因爲它會引發錯誤。我不明白爲什麼。PHP MS_SQL分頁錯誤與查詢
繼承人的查詢:
SELECT TOP 10 * FROM Products WHERE SubCatID = '".$scid."' and ProductID NOT IN (SELECT TOP 0 * FROM Products ORDER BY ProductID ASC) ORDER BY ProductID ASC
繼承人的錯誤:
Warning: mssql_query() [function.mssql-query]: message: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. (severity 16)
我知道這是因爲子查詢的,但任何人都可以只點我在正確的方向請?
謝謝男人:)我會接受,當我可以 – Bohdi