database_exists not working -- CI Newb here - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: Issues (https://forum.codeigniter.com/forumdisplay.php?fid=19) +--- Thread: database_exists not working -- CI Newb here (/showthread.php?tid=1637) |
database_exists not working -- CI Newb here - ant099 - 03-27-2015 I'm building an site that needs to build a database table on the fly the first time a user visits a certain page. I'm trying to detect if the table already exists before going through the hassle of building the table. I am loading the Code: dbutil() Then to do the test: PHP Code: if( !$this->dbutil->database_exists($answerDB) ){ with Code: $answerDB The problem is that Code: $this->dbutil->database_exists( Should be straight forward but for some reason I'm missing something.... Any help is much appreciated.Thanks! RE: database_exists not working -- CI Newb here - Rufnex - 03-28-2015 Have you checked your spelling? This works fine for me PHP Code: $this->load->dbutil(); RE: database_exists not working -- CI Newb here - sintakonte - 03-31-2015 if i read it correctly it looks like you check if an Database exists rather than the table exists or am i missing something here ? |