下面是错误报告:
错误SQL 查询: 文档SELECT *
FROM header
LIMIT 5 , -1MySQL 返回:文档
#1064 - 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 '-1' at line 1 
不是说-1是从第5行记录到最后一行吗??
为什么会有语法错误??

解决方案 »

  1.   

    好象没说可以是负值啊[align=center]====  ====
    [/align]
      

  2.   

    [LIMIT {[offset,] row_count | row_count OFFSET offset}]
    [align=center]====  ====
    [/align]
      

  3.   

    SELECT * 
    FROM header 
    LIMIT 5 , -1 只能是非负。
      

  4.   

    With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1): SELECT * FROM tbl LIMIT 5,10;  # Retrieve rows 6-15To retrieve all rows from a certain offset up to the end of the result set, you can use some large number for the second parameter. This statement retrieves all rows from the 96th row to the last: SELECT * FROM tbl LIMIT 95,18446744073709551615你把-1改成一个超大数,就可以了。