Wordpress with PHP Everywhere

Sometimes you have to handle things in Wordpress that you can't find any plugin for. In our case I had to visualize a list from a MySQL database and in another case I had to fetch data from another website. In both cases I solved it with inserted PHP code which is executing and getting the info.