This script will take the results of a query and sets up number of records per ...
This script will replace single quotes so the data is SQL-safe
50 chars max.