select card.* from card, ranking, sort where card.crid in (0,1000000176,1000000196,1000000187,1000000181,1000000197,1000000182,1000000183,1000000184,1000000195) and ranking.crid = card.crid and sort.crid = card.crid order by desc ranking.total

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'desc ranking.total' at line 1