ini_set('display_errors', true);
ini_set('error_reporting', E_ALL);
Но это не помогает. SELECT `ID_1`, @last := `ID_2` AS `ID_2`
FROM (
SELECT `ID_1`, `ID_2`
FROM `table`
ORDER BY `ID_1`, `ID_2`
) AS `t`, (SELECT @last:=0) as init
WHERE `ID_1` > @last;