Reconnecting to a database after dropping it - simple question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Reconnecting to a database after dropping it - simple question (/showthread.php?tid=3386) |
Reconnecting to a database after dropping it - simple question - El Forum - 09-27-2007 [eluser]LeePR[/eluser] Hey guys, I'm using the database utilities class to drop and recreate a database. Here are the three relevant methods in my UnitTestUtil class: Code: /** Drop the database. */ All three methods work perfectly when run on their own however when I try to do the following: Code: $utils->dropDatabase(); I get the following error message Quote:Error Number: 1046 I've tried everything - how can I reconnect to the newly created database? It's the same database that's in the config file - it connects with a call to `$utils->loadDefaultData()` the first time around, but not after dropping and recreating it. Thanks in advance, LeePR |