Database stuff isn't my strong point, but I believe that this should work.
PHP Code:
$server = "localhost";
$db_name = "dbname"
$user = "user";
$pass = "pass";
$logo="SELECT logo * FROM logo";
$db_connection =
mysql_connect("$server","$user","$pass")
or die ("No DB Connection");
$db = mysql_select_db("$db_name",$db_connection)
or die ("Couldn't select DB");
echo "$logo";
DISCLAIMER: As stated at the top of this post, database stuff is NOT my strong point. I strongly reccomend that you back up before attempting this. I will NOT be held responsible for any damage caused by this code.
USE THIS AT YOUR OWN RISK