limit_offset($rdbms, "select InstallationRecord.NetworkOID, ".
"InstallationRecord.EquipmentOID as SerialNumber, ".
"InstallationRecordSubtype.Description as Type,".
to_char("InstallationRecord.RecordDate")." as RecordDate ".
"from InstallationRecord, InstallationRecordSubtype ".
"where InstallationRecord.Subtype = InstallationRecordSubtype.Subtype ".
"and InstallationRecord.NetworkOID in (select FacilityID from meter ".
"where OperationalArea in (select OperationalArea from
UserOperationalArea where ".
"username = '".$_SESSION["UserName"]."'))".
"order by InstallationRecord.NetworkOID, InstallationRecord.RecordDate,".
"InstallationRecord.Subtype desc ",
$params['perPage'],$from-1)