Fixed bug in get_records_sql(). This call:
Fixed bug in get_records_sql(). This call:

$rs = get_recordset_sql($sql, $limitfrom='', $limitnum='');

should really be:

$rs = get_recordset_sql($sql, $limitfrom, $limitnum);

dilawar/moodle