CodeIgniter Forums
Initialisation of the Database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Initialisation of the Database (/showthread.php?tid=62919)



Initialisation of the Database - maquejp - 09-08-2015

Hi! I would like to implement an installation routine.
When my default controller is started, it should invoke a function that create if needed the tables in my database...

The question is where do I put (best practice) the function? In the main controller? In a model? I tried in an Helper but got issues with the db->table_exist()


RE: Initialisation of the Database - InsiteFX - 09-08-2015

Create and put them in a install model