• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installation script for a CodeIgniter-based CMS

As a way to teach myself CodeIgniter I'm creating a CMS (here: https://github.com/TCotton/CodeSharp).

I'm looking at creating an installation script for the database. So here is my thought process so far:

I've placed this in the central contoller file:

if (file_exists("application/views/admin/install_view.php")) {



The idea being is that the user is automatically redirected to the install script, they fill in their user details and submit the form; the database is then created and the file destroyed. Then they'll find themselves back on the home page with a working CMS ready to go.

However, the models are still making calls to tables which don't yet exist:

A Database Error Occurred

Error Number: 1146

Table 'cotton_codesharp.admin' doesn't exist

SELECT * FROM (`admin`)

Filename: /home/cotton/public_html/codesharp/models/admin_config_model.php

Line Number: 105

Does anybody have any ideas how I can get around this?

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.