<?php
// arrPosts - массив id избранных постов
if(in_array($post->id, arrPosts)) { ?>
<div class='star'>...</div>
<?php } else { ?>
<div class='star_empty'>...</div>
<?php } ?>
select * from `bulletins`
where
`price` > $value
order by
`price` asc,
`id` asc
LIMIT 1000, 10