Pagination requires reading a record set twice: Once to read the whole set so that it can count the total number records Then to read a window of records to display Here’s my way of doing it: Using a public class property to store the total records (public $total_records) Using a private function to build […]
One of the common issues with MVC controller is to use the same controller method to show a form and then process it’s content, once we receive POST.
If you are restricted by the web hosting company about how many databases you can create, there is a trick you can use to get the maximum out of that ‘single’ database. The answer is to use a prefix with tables. The secret is to use the key every time you refer the tables.
There are times when you need to save configuration information for a project. I get this requirement time and again. Since most of my projects are database driven, I decided to use a database table dedicated to save this config info. I also developed few functions to read and set these settings.