Mysql and php selection

Im using slideshowpro for an image gallery. this uses a mysql database.
i have added a page which show the last nine images added to the database using this

$query = “SELECT * FROM ssp_images ORDER BY modified DESC LIMIT 9”;

this then makes an xml for the images…works fine…but…
can i filter the output?

my problem is i need to add some pics from a portrait session and a wedding but these will be password protected, is there anyway i can ignore a certain album / albums ?

the album field is “aid”

or blank any image from say album 20 or above ?

be gentle with me, it’s my first time using php/mysql :wink:

thanks