SELECT 
	*
	
FROM 
	`rates-nl`.`nl`
	  
WHERE  
    IF( :mtype<>'', IF( :mtype='all', true, `mtype` = :mtype ), true )
	AND
    IF( :mvalue<>'', IF( :mvalue='all', true, `mvalue` = :mvalue ), true )
	AND
    IF( :elabel<>'', IF( :elabel='all', true, `elabel` = :elabel ), true )

ORDER BY 
	`provider` ASC,
	`product` ASC,
	`mtype` ASC,
	`mvalue` ASC,
	`elabel` ASC
	
LIMIT 
 :limit 
 
OFFSET 
 :offset		