Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]CI dbforge help
#1

[eluser]Neocrypter[/eluser]
Hello all im trying to create a simple schema with dbforge but im not sure if im just not using it right or if there is something else wrong here here is my code,
Code:
if($this->db->table_exists('banned_users')){
            echo 'Table banned_users exists, no need to setup.';
        }else{
                $feilds = array(
                            'banned_user_id'=> array(
                                            'type' =>'INT',
                                            'constraint' =>10,
                                            'unsigned'=>TRUE,
                                            'auto_increment'=>TRUE
                        
                            ),
                            'banned_user_slname' => array(
                                                    'type' =>'VARCHAR',
                                                    'constraint'=>100
                            ),
                            'banned_uuid'=>array(
                                            'type'=>'VARCHAR',
                                            'constraint'=>100,                                            
                            ),
                            'banned_from'=>array(
                                            'type'=>'VARCHAR',
                                            'constraint'=>100
                            ),
                            'banned_by'=>array(
                                            'type'=>'VARCHAR',
                                            'constraint'=>60
                            ),
                            'banned_reason'=>array(
                                                'type'=>'VARCHAR',
                                                'constraint'=>500
                            ),
                            'banned_when'=>array(
                                            'type'=>'VARCHAR',
                                            'constraint'=>20
                            )
                                    
            );
            $this->dbforge->add_feild($feilds);
            $this->dbforge->add_field('id');
            $this->dbforge->add_key('banned_user_id',TRUE);
            $this->dbforge->create_table('banned_users',TRUE);
        }

any help would be great thanks


Messages In This Thread
[SOLVED]CI dbforge help - by El Forum - 08-12-2010, 04:36 PM
[SOLVED]CI dbforge help - by El Forum - 08-12-2010, 07:47 PM
[SOLVED]CI dbforge help - by El Forum - 08-12-2010, 09:57 PM
[SOLVED]CI dbforge help - by El Forum - 08-12-2010, 10:27 PM
[SOLVED]CI dbforge help - by El Forum - 08-13-2010, 01:20 AM
[SOLVED]CI dbforge help - by El Forum - 08-13-2010, 02:00 AM
[SOLVED]CI dbforge help - by El Forum - 08-13-2010, 02:25 AM
[SOLVED]CI dbforge help - by El Forum - 08-13-2010, 03:41 AM
[SOLVED]CI dbforge help - by El Forum - 08-13-2010, 09:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB