I have to put down the lines that have two distinct fields with value = 0
Let me explain, all records that have stock_it=0 and stock_eu=0 must go to the bottom of the results
I have used this solution, however, it is not strictly correct because it puts down even rows that do not have both values = 0
$dati = mysql_query("
SELECT *
FROM $tb_article
ORDER BY
FIELD($tb_art.article_status,'n') DESC,
FIELD($tb_art.article_stock_it,'0') ASC,
FIELD($tb_art.article_stock_eu,'0') ASC,
$tb_art.article_rank
");
article_status=nindicates new products and they have to stay on top!- Push to bottom all the article that have stock IT and stock EU = 0 (products not available)
- In the end, order the rest of the articles according to the rank assigned