32-й сезон, ИД 11712. Ближайшие матчи - ИД 11714 (пт 13/12/2024) Чемпионат мира, групповой этап, 1-й тур
Query:
select tr.day, DATE_FORMAT(d.date,'%d/%m/%Y') as date, summa, balance, text, IF(m2.id > 0, IFNULL(mh1.manager, '---'), IFNULL(mh.manager, '---')) as manager, IF(m2.id > 0, IFNULL(m1.id, 0), IFNULL(m.id, 0)) as id from transactions tr, days d left join manager_histories mh on mh.team = '324' and d.date >= mh.date_start and d.date <= mh.date_end left join manager_histories mh1 on mh1.team = '324' and d.date >= mh1.date_start and (d.date <= mh1.date_end or mh1.date_end = '0000-00-00') left join managers m on mh.manager = m.name left join managers m1 on mh1.manager = m1.name left join managers m2 on m2.team = '324' where tr.team = '324' and tr.day = d.day order by tr.day desc, tr.id desc limit -100, 50
error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-100, 50' at line 18