Welcome Guest, Not a member yet? Register   Sign In
Rename a field with dbforge
#1

I'm trying to rename a field, like this:
PHP Code:
$this->load->dbforge();
$fields = array(
    
'old_name' => array(
        
'name' => 'new_name',
        
'type' => 'VARCHAR'
    
)
);
$this->dbforge->modify_column('table'$fields); 
This gives an error message: MySQL syntax error on line 2, near ''
I can't see what I'm doing wrong here. Any help is appreciated.
Reply


Messages In This Thread
Rename a field with dbforge - by Wouter60 - 04-09-2017, 10:50 PM
RE: Rename a field with dbforge - by InsiteFX - 04-11-2017, 03:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB