Param.put ("PageNo", PageNo);
Param.put ("PageSize", pageSize);
Usage in the Sqlmap
Limit ${pageno},${pagesize}
I hit the code today with the result of the error: Limit #pageNo #, #pageSize #
And then we found out about the data.
The limit should not be followed by # (I pass in an integer), but should be in $,
The difference between #与 $. (usually you can use the #, do not use $.)
#是把传入的数据当作字符串, such as #pageno# incoming is pageno, then SQL statement generation is so, limit ' pageno ', will error.
The incoming data is generated directly in SQL, such as #pageno# incoming pageno, then SQL statement generation is so,
Limit PageNo value, pagesize value
#方式能够很大程度防止sql注入. The $ method cannot prevent SQL injection.
The $ method is typically used to pass in database objects. For example, incoming table names.
The limit dynamic parameter of Ibatis in MySQL