db->begin(); $rslt = $this->db->query( 'SHOW TABLES' ); $rslt->setFetchMode( PDO::FETCH_NUM ); $rows = $rslt->fetchAll(); foreach ( $rows as $row ) { $table = $row[0]; $this->db->exec( "DROP TABLE `$table`" ); } $this->db->commit(); } } ?>