• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change name of ID field in database

I wanna use default CI tools to work with database, but i also want to change name of ID field to something like - private_messages_ID - to make it easier to make Joins and other combined query...
Is there a way?

You will need to do this using phpMyAdmin or some other tool enter the sql.

ALTER TABLE `table_name` CHANGE `ID` `private_messages_ID` INT( 11 ) NOT NULL AUTO_INCREMENT

Change table_name to the name of your table.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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