You can try this, then see if your table exists within the array. http://www.milesj.me/blog/read/75/Retrieving-Tables-Within-Your-Cake-Database
On Feb 1, 8:27 am, Lorenzo Bettini <[email protected]> wrote: > Hi > > is this a correct way of checking whether a table exists? > > function check_table_exists($table) { > $dbo = $this->getDataSource(); > $result = $dbo->_execute('DESCRIBE '.$table); > return !empty($result); > } > > thanks in advance > Lorenzo > > -- > Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino > HOME:http://www.lorenzobettini.itMUSIC:http://www.purplesucker.com > BLOGS:http://tronprog.blogspot.com http://longlivemusic.blogspot.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
