Why make two queries with a limit of one, and the second selects all records? This is for versatility?
queries
Started by victor, 02 September 2012 - 10:54 AM
- Single Page
Posted 02 September 2012 - 10:54 AM
Posted 02 September 2012 - 19:48 PM
The second query is the count rows query. For this ajax query: [attachment=260:2012-09-02_205142.png] In Codeigniter when you have the num_rows() it simply returns the
or something similar (perhaps in PHP) so I just use the num_rows instead of count_all_results() that uses the COUNT(*) because I had some problems with it from grouping data. You can take a look at the post http://www.grocerycr...se/#entry2036 for more
SELECT FOUND_ROWS()
or something similar (perhaps in PHP) so I just use the num_rows instead of count_all_results() that uses the COUNT(*) because I had some problems with it from grouping data. You can take a look at the post http://www.grocerycr...se/#entry2036 for more