Welcome Guest, Not a member yet? Register   Sign In
SEO Plugins
#2

For the database to do something like that you would need to write a database stored procedure for your database of choice (beyond the scope of this post and CodeIgniter since they are not written in PHP). In order to have PHP do something like that probably the best place would be in a model.

For Example:

Code:
class dates_model extends ci_model {

    public function insert($data) {
        /* here actually look at the incoming data and actually insert 3 rows */
    }

/* -- or -- */

    public function get_next($months,$input) {
        /* here actually grab the $input record (by id or month or something) and then create 3 records which are returned (but aren't actually in the table) */
    }

} /* end class */


DMyers
Reply


Messages In This Thread
SEO Plugins - by jetztgleich - 06-23-2016, 01:22 PM
RE: Issue date - by dmyers - 06-23-2016, 03:56 PM
RE: Issue date - by pravins - 06-24-2016, 02:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB