21/01/2014
I've had the problem that my pagination was adding empty rows until $RowsPerPage condition was met.
However using this code to "cut-off" empty results that are being return through a mysql_fetch_array command, I was able to solve this problem.
if (!trim($row[$i]))continue;