Of course I can help! That's why I'm here :p
Okay, I'll show you the query you need, and then I'll direct you to the PHP functions you'll need to use after that. Try to do it on your own, and if you can't manage it, post what you did try and we can go from there.
$conn = mysql_connect($host, $user, $pass) or die('Error - MySQL said: ' . mysql_error()); // modify this to suit your server's configuration
$query = 'SELECT `href`, `src`, `alt` FROM `ads` ORDER BY RAND() LIMIT 1';
$exec = mysql_query($query) or die('Error - MySQL said: ' . mysql_error());
Next, since we're only retrieving 1 row, we don't need a [man]while/man loop as normal SQL retrieval would call for. Instead, we only need to make 1 call to a MySQL retrieval function. I like to use [man]mysql_fetch_assoc/man because when you reference the column names in the code, you can use their actual name (instead of a numbered array 0, 1, 2, etc.).
Visit the manual page for [man]mysql_fetch_assoc/man and specifically focus on the code examples they give. After reading what the function does and seeing it in action in their examples, you should be able to finish off the script.