Fix limits in JDatabaseQuery

Fix here: http://www.joomlaportal.de/joomla-2-5-installation/303554-sammelthread-joomla-2-5-15-a-3.html#post1499731 

and tested on forums here: http://forum.joomla.org/viewtopic.php?f=615&t=825307