The code you are showing in the above post is NOT in either of those plugins. Open plog-content/plugins/latest-images/latest-images.php and plog-content/plugins/latest-images/latest-images.php in a text editor, and you will not find that code in either file.
The file that you edited is probably located in the root directory of your gallery, rather than in the respective plog-content/plugins folders for each plugin. You need to delete that script, as it is no longer required and can cause issues with the latest version of Plogger (hence your error). And, for the record, we are closing the database connections properly in the latest SVN version.
If you navigate to the plugins tab in the admin section and click Use this plugin next to the plugins you want to use, you will be given the proper php include code to insert in the area of your website where you would like either random or latest images to be displayed.
If you have any more questions about how to use the new versions of the plugins, please post them back here and either sid or myself will try to help you.
Warning: mysql_error(): 8 is not a valid MySQL-Link resource in /home/xxxxxx/public_html/gallery/plog-includes/plog-functions.php on line 551
SELECT `p`.*, `a`.`path` AS `album_path`, `c`.`path` AS `collection_path` FROM `plogger_pictures` AS `p` LEFT JOIN `plogger_albums` AS `a` ON `p`.`parent_album`=`a`.`id` LEFT JOIN `plogger_collections` AS `c` ON `p`.`parent_collection`=`c`.`id` WHERE `p`.`id` = 18