I have a news table with the fields titulo
, conteudo
and destaque
, the highlight being int (1), is a Boolean value only to check if a news item is highlighted or not, what would you like to do is to select a quantity of news and within that amount X news need to be highlights ( destaque=1
), something like this:
SELECT * FROM noticias WHERE destaque = 1 limit 5 AND ... LIMIT 30.
That is, 30 news items, 5 of them are highlights and the rest (25) are "common."
How can I do this?