0

I am creating dynamic database with the help of dbforge in codeigniter with this code -

$this->load->dbforge();
$this->dbforge->create_database('mydatabase');

Now I want to rename this database dynamically, but i am not getting such type of method related to rename_database

your solution will be appreciated.

bipen
  • 36,319
  • 9
  • 49
  • 62
shashikant
  • 21
  • 8

1 Answers1

0

see How do I quickly rename a mysql database (change schema name)?

Basically, you can't (shouldn't) because it's potentially dangerous, so i guess that Codeigniter does not have any method for this. Anyway, changing the database name isn't something that the application should ever do.

Anyway, there are multiple ways depending on your database and/or engine listed in the linked answer.

Community
  • 1
  • 1
STT LCU
  • 4,348
  • 4
  • 29
  • 47
  • You are right we can't rename the database dynamically, but I was in confusion so asked this silly question.. – shashikant Apr 30 '13 at 12:23