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.


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())
  • ah sweet. so there is a built in workaround for those obscure queries. Thanks Brandon. – Marc Miller Jan 16 '13 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.