[eluser]InsiteFX[/eluser]
Try this and see if it will work for you.
Also make sure that the database is loaded or it will not work!
Model: installDB
Code:
<?php
class InstallDB extends Model {
function installDB()
{
parent::Model();
$this->load->dbforge();
}
function createTables()
{
$this->dbforge->create_table('users', TRUE);
$fields = array(
'id' => array('type' => 'int')
);
$this->dbforge->add_column('users', $fields);
//$this->dbforge->create_table('details', TRUE);
}
function insertdetails()
{
}
}
?>
Controller: install
Code:
<?php
class Install extends Controller
{
function install() {
parent::Controller();
$this->load->model('installDB');
}
function index()
{
$data['title'] = 'SkyePHP | Install SkyePHP';
$this->installDB->createTables();
$this->load->view('install_view', $data);
}
function sitedetails() {
$this->installDB->insertdetails();
}
function step2() {
}
function step3() {
}
}
?>
InsiteFX