The easy way that doesn't guarantee unique images is fine. But I'm a bit confused. To get my records from the updates table I use this
$query = "SELECT *FROM updates ORDER BY date DESC";
So for that
SELECT images FROM portfolio ORDER BY RAND();
part, where do I put it? In the same query? Or do I have to make a new query? I'm sorry I'm really completely new to this and when I try putting it together I'm getting errors.