Hola, he modificado este procedimiento de MS SQL Server hacia MySQL y ha quedado así:
Código MySQL:
Ver originalDELIMITER $$
SET startIndex
= IF(startIndex
< 1, 1, startIndex
); SET pageSize
= IF(pageSize
< 1, 1, pageSize
); SET upperBound
= startIndex
+ pageSize
; SET @sqlStatement
= CONCAT('SELECT E.id_evento, E.titulo, E.fecha_evento, E.lugar FROM (SELECT *, @cnt := (@cnt + 1) AS row_number
FROM gp_eventos_prin
ORDER BY fecha_evento ASC) AS E
WHERE rowNumber >=',startIndex,' AND rowNumber <',upperBound,')');
PREPARE stmt_name
FROM @sqlStatement
;
EXECUTE stmt_name;
DELIMITER ;
Ya lo he solucionado!!!!
Gracias a todos por la ayuda, un Saludo!