I just read about mysql's SQL_CALC_FOUND_ROWS and FOUND_ROWS() which helps you get the total result size of a previously executed query by dropping the LIMIT conditions. Now i want to use this feature in an existing web application.
I have a few approaches in mind, but I'm not sure which is best:
1) Does PHP already have functions that use the FOUND_ROWS() feature? I'm using php 5 with mysqli and mysql 5 with innodb storage engine.
2) The application I'm building already has it's own data access object that wraps the mysqli library. It is responsible for generating frequently used CRUD queries. Should I edit this object to include the SQL_CALC_FOUND_ROWS on all SELECT queries? What complications might exist?
Any other ideas/feedback?