Is there a codeigniter active record way of doing something like:
if(mysql_num_rows(mysql_query("SHOW TABLES LIKE exp_mytable"))==1)
I'm not seeing Show Tables as a method in the docs.
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityIs there a codeigniter active record way of doing something like:
if(mysql_num_rows(mysql_query("SHOW TABLES LIKE exp_mytable"))==1)
I'm not seeing Show Tables as a method in the docs.
Neither Active Record nor DB Forge have a “SHOW TABLES” function. You’d have to just do it with query()
:
if ($EE->db->query('SHOW TABLES LIKE `exp_mytable`')->num_rows())