• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

#2
And what did the error say was wrong it shows the query part.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


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