select id from infolist where block= and (dt< or (id< and dt<=)) order by dt desc, id desc limit 1
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 'and (dt< or (id< and dt<=)) order by dt desc, id desc limit 1'
select id from infolist where block= and (dt> or (id> and dt>=)) order by dt asc, id asc limit 1
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 'and (dt> or (id> and dt>=)) order by dt asc, id asc limit 1' at

RU | EN | ES | FR | PL | IT | 中文