there are many phpblocks hanging around that will serve you as perfect guidelines. check the downloads section here and I think the faq has some links to where you can get stuff for geeklog like blocks, etc. Most of the geeklog code itself has tons of database query stuff that will guide your efforts.
DON'T use your db username and password in the phpblock. there is no need to connect to the db or disconnect or anything like that. if you are using the phpblock within the confines of your geeklog pages, that is all taken care of for you.
so all you need is a quick and easy to read
tutorial on how to use the "SELECT" query for mySQL.
once you've selected your data, loop thru your result set and display/echo the data using basic HTML. done