SELECT b.id FROM c1vaca_skide.ac_bild b INNER JOIN c1vaca_skide.ac_text t ON ElementID IN (8831, 8831) AND b.TextID = t.ID AND b.Typ IN ('m', 'o', '') AND (b.Winter = 1) ORDER BY case when ElementID = 8831 then 0 else 1 end, CASE WHEN b.Winter = 1 then 0 else 1 end, case when t.name = 'Lage' then 0 when t.name = 'Einrichtung' then 1 else 2 end, t.Reihenfolge, t.id, b.Reihenfolge, b.Name Limit 1
Table 'c1vaca_skide.ac_bild' doesn't exist