public function listCollections(array $pWithFields = array())
    {
        $tables = array();

        $prepared = $this->getConnection()->prepare('SHOW TABLES FROM `' . $this->_dbName . '`');
        if ($prepared->execute()) {
            while ($row = $prepared->fetchObject()) {
                $table = str_replace($this->getDbPrefix(), '', current($row));

                foreach ($pWithFields as $field) {
                    $preparedJoin = $this->getConnection()->prepare('SHOW COLUMNS FROM `' . current($row) . '` LIKE "' . $field . '"');
                    $preparedJoin->execute();
                    if ($preparedJoin->execute() and ! $preparedJoin->rowCount()) {
                        continue 2;
                    }
                }

                $tables[] = $table;
            }

        }

        return $tables;
    }
public function listCollections(array $pWithFields = array())
    {
        $tables = array();

        $prepared = $this->getConnection()->prepare('SHOW TABLES FROM `' . $this->_dbName . '`');
        if ($prepared->execute()) {
            while ($row = $prepared->fetchObject()) {
                $table = str_replace($this->getDbPrefix(), '', current($row));

                foreach ($pWithFields as $field) {
                    $preparedJoin = $this->getConnection()->prepare('SHOW COLUMNS FROM `' . current($row) . '` LIKE "' . $field . '"');
                    $preparedJoin->execute();
                    if ($preparedJoin->execute() and ! $preparedJoin->rowCount()) {
                        continue 2;
                    }
                }

                $tables[] = $table;
            }

        }

        return $tables;
    }
public function listCollections ( array $ pWithFields = array ( ) ) { $ tables = array ( ) ; $ prepared = $ this -> getConnection ( ) -> prepare ( 'SHOW TABLES FROM `' . $ this -> _dbName . '`' ) ; if ( $ prepared -> execute ( ) ) { while ( $ row = $ prepared -> fetchObject ( ) ) { $ table = str_replace ( $ this -> getDbPrefix ( ) , '' , current ( $ row ) ) ; foreach ( $ pWithFields as $ field ) { $ preparedJoin = $ this -> getConnection ( ) -> prepare ( 'SHOW COLUMNS FROM `' . current ( $ row ) . '` LIKE "' . $ field . '"' ) ; $ preparedJoin -> execute ( ) ; if ( $ preparedJoin -> execute ( ) and ! $ preparedJoin -> rowCount ( ) ) { continue 2 ; } } $ tables [ ] = $ table ; } } return $ tables ; }
List all the database's collections.

@param array $pWithFields Fields that must exist in collections
@return array
@todo Test this method with $pWithFields
List all the database s collections .