mysql> SELECT SQL_CALC_FOUND_ROWS * FROM tbl_nameWięcej znajdziecie tutaj:
-> WHERE id > 100 LIMIT 10;
mysql> SELECT FOUND_ROWS();
The second SELECT returns a number indicating how many rows the first SELECT would have returned had it been written without the LIMIT clause.
http://dev.mysql.com/doc/refman/5.0/en/information-functions.html
No comments:
Post a Comment