Make LIMIT clause nicer in MySQL select

Signed-off-by: Joern Bernhardt <jb@campudus.com>