Combine several SQL querys to one
===

I know this is probably really simple but I have tried to find some similar examples and failed. 

The problem is that I would like to list 8 random images from a gallery in a database, sorted by added date. And I have managed to do this, but only with several iterating query's that becomes really slow. So if someone would be so kind to teach me about combining them for faster speed, I guess UNION is the way to go? Here is my working (but slooow code)

    <?php		
    		$latestPictures = mysql_query("SELECT pictureID, addedDate FROM picture ORDER BY addedDate DESC LIMIT 8"); 
    		
    		$latestConcerts = mysql_query("SELECT concertID, addedDate FROM concert WHERE pictureID is null ORDER BY addedDate DESC LIMIT 8"); 
    		
    		
    		// Add concerts and pictures to array
    		while($curFestival = mysql_fetch_object($latestPictures))
    		{
    			$array[$curFestival->addedDate] = "p" . $curFestival->pictureID;
    		}
    		
    		while($curConcert = mysql_fetch_object($latestConcerts))
    		{
    			$array[$curConcert->addedDate] = "c" . $curConcert->concertID;
    		}
    		
    		// Order array by key
    		krsort($array);
    		
    		$latestArray = array_slice($array, 0, 8);
    		
    		foreach($latestArray as $key => $value) {
    			
    			$type = substr($value, 0, 1);
    			$ID = substr($value, 1);
    			
    			// If type == picture
    			if($type == 'p')
    			{			
    				$picturesPicturesID = mysql_query("SELECT concertID, name FROM photo WHERE concertID IN(SELECT concertID FROM concert WHERE pictureID = $ID) ORDER BY photoID");
    				
    				// Get random picture
    				$curRandomPicture = rand(0, (mysql_num_rows($picturesPicturesID) - 1));
    				$curPictureConcertID = mysql_result($picturesPicturesID, $curRandomPicture, "concertID");
    				$curPictureName = mysql_result($picturesPicturesID, $curRandomPicture, "name");				
    				$curPicture = mysql_fetch_object(mysql_query("SELECT c.URL, p.name FROM concert c, picture p WHERE p.pictureID = c.pictureID AND c.concertID = $curPictureConcertID")); 
    					
     			 echo "Some image"; 
     			 }
    			// If type == concert
    			if($type == 'c')
    			{
    				$concertPicturesID = mysql_query("SELECT concertID, name FROM photo WHERE concertID = $ID ORDER BY photoID");
    				
    				// Get random picture
    				$curRandomPicture = rand(0, (mysql_num_rows($concertPicturesID) - 1));	
    				$curPictureConcertID = mysql_result($concertPicturesID, $curRandomPicture, "concertID");
    				$curPictureName = mysql_result($concertPicturesID, $curRandomPicture, "name");				
    				$curPicture = mysql_fetch_object(mysql_query("SELECT URL, name FROM concert WHERE concertID = $curPictureConcertID")); 
    
    			echo "Some image";
    			}
    		}
    ?>