To display all of a user's pets in a dropdown, there's this code
PHP Code:
$stmt = $mysidia->db->select("owned_adoptables", array("name", "aid"), "owner = '{$mysidia->user->username}'");
You can narrow down which adoptables are available in the dropdown, in your case by level and alternates, with something like this:
PHP Code:
$stmt = $mysidia->db->select("owned_adoptables", array("name", "aid"), "owner = '{$mysidia->user->username}' AND level >= '4' AND usealternates = 'no'");
It would also select adoptables who have a level higher than 4, since it uses ">=", but you could change it to just "=" if you only wanted level 4 pets to appear.