Here you will find information about the databases, tables & columns (fields) used by ReadingRecord.
The config database contains ReadingRecord configuration settings for a specific site (library):
The config database has 3 tables:
ReadingRecord uses one config database per site (library). In general, the config database is named using part or all of the hostname portion of the URL. For example, if the URL is 'wpl.readingrecord.net', the config database would be 'wpl_config'.
The global table contains configuration settings that affect the site (library) as a whole. For example, the library name, banner image, etc. The global table contains the following columns:
globalId
Format: Unique number automatically assigned by MySQL.
Example: 1
Default: 1
Description: Currently there is only 1 record in this table, so globalId should always be 1.
siteHost
Format: Text.
Example: This site hosted by Limited North, LLC.
Default: This site hosted by message.
Description: This column is reserved for future use.
indexStart
Format: yyyy-mm-dd
Example: 2013-01-07
Default: 2013-01-01
Description: This field is the start date for displaying the main index page for patron self-registration. Since individual programs can have different self-registration start dates, this field should be set the same as the earliest self-registration start date (config.program.regStart). When before this date, patrons will see the “registrationFailure” page. Note: This field does NOT affect access to the staff module.
indexEnd
Format: yyyy-mm-dd
Example: 2013-08-06
Default: 2020-12-31
Description: This field is the end date for displaying the main index page for patron self-registration. Since individual programs can have different self-registration end dates, this field should be set the same as the last self-registration end date (config.program.regEnd). When after this date, patrons will see the “registrationFailure” page. Note: This field does NOT affect access to the staff module.
pageTitle
Format: Text
Example: Westminster Public Library - ReadingRecord
Default: Template Library - ReadingRecord
Description: This text appears in the browser title bar.
libraryName
Format: Text
Example: Westminster Public Library
Default: Template Library
Description: The library name. This text appears in a variety of places within ReadingRecord.
imageDir
bodyColor
hrOpts
allowDups
Format: 0 (disallow) or 1 (allow).
Example: 1
Default: 1
Description: Allow or disallow patrons to register for more than one program. If only one program is enabled, this option has no effect.
enable1
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 1
Description: Disable or enable program #1. If enabled, config.global.db1 must also be set.
enable2
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 0
Description: Disable or enable program #2. If enabled, config.global.db2 must also be set.
enable3
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 0
Description: Disable or enable program #3. If enabled, config.global.db3 must also be set.
enable4
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 0
Description: Disable or enable program #4. If enabled, config.global.db4 must also be set.
enable5
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 0
Description: Disable or enable program #5. If enabled, config.global.db5 must also be set.
enable6
Format: 0 (disabled) or 1 (enabled).
Example: 0
Default: 0
Description: Disable or enable program #6. If enabled, config.global.db6 must also be set.
db1
db2
db3
db4
db5
db6
The login table contains login, password & report access information for staff & volunteers. It has 5 columns:
login_id
Format: Unique number automatically assigned by MySQL.
Example: 1
Default: None (automatically assigned).
Description: A unique number assigned to each staff/volunteer account.
user_name
Format: Text. Letters only, no numbers, spaces or special characters.
Example: staff
Default: none
Description: Login user name for staff or volunteer.
password
real_name
reports_access
The program table contains configuration options for individual programs. It contains the following columns:
progId
Format: Unique number automatically assigned by MySQL.
Example: 1
Default: none
Description: ReadingRecord supports up to 6 programs, so there will be 1 row (record) for each program. Records for unused program(s) can be safely ignored.
regStart
regEnd
altURL
Format: Text in the form of a
URL.
-
Default: none
Description: This field allows you to publish information about a reading program NOT using ReadingRecord, as well as provide a
URL for more information. When text appears in this field, program information will appear along with the alternate
URL. No link to register via ReadingRecord will be available. You might use this option if you have an adult reading program that has a separate website rather than ReadingRecord. (
Note: It is Jean Ward's fault that this field and corresponding code exist! )
longPgrmName
Format: Text
Example: Get with the program - 2013 Summer Reading for kids.
Default: Long Program Name
Description: Long(ish) program name displayed on the self-registration pages.
shortPgrmName
pgrmRange
pgrmInfo
Format: Text
Example: The Children's Summer reading program for Library XYZ runs from blah, blah, something, something, ham sandwich…
Default: none
Description: Informational paragraph about the reading program. Can include some basic
HTML elements like paragraph tags, font size/color/style and an embedded link to elsewhere. Appears on the self-registration index page.
useLibrary
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's home library. If enabled, the corresponding program's 'library' table must be populated with a list of branches.
libraryLabel
usePersonalHeader
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: If enabled, displays the “Personal Info” header. In most cases this should be enabled.
personalHeaderLabel
firstNameLabel
lastNameLabel
phoneDigits
phoneError
Format: Text
Example: Please use the format 123-456-7890. Don't want to give your phone number? Enter 000-000-0000.
Default: Please use the format 123-456-7890. No phone? Enter 000-000-0000.
Description: Error message displayed when the phone number is entered incorrectly.
phoneAreaCode
useAge
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's age. If enabled, the corresponding program's 'age' table must be populated with a list of ages.
ageLabel
useBdate
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's birth date. Currently this is a plain text box, no date validation is available for 2013.
requireBdate
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When enabled, is the “birth date” field optional or required?
bdateLabel
useGender
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's gender. If enabled, the corresponding program's 'gender' table must be populated with a list of genders.
genderLabel
useCity
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's city. If enabled, the corresponding program's 'city' table must be populated with a list of cities.
cityLabel
useZipcode
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's zipcode. If enabled, the corresponding program's 'zipcode' table must be populated with a list of zipcodes.
zipcodeLabel
useEmail
requireEmail
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the patron's e-mail address, is it optional or required?
emailLabel
useBarcode
requireBarcode
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the patron's library barcode, is it optional or required?
barcodeLabel
useSchoolHeader
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: If enabled, displays the “School Info” header. Should be enabled when tracking grade and/or school.
schoolHeaderLabel
useGrade
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's grade. If enabled, the corresponding program's 'grade' table must be populated with a list of grades.
gradeLabel
useSchool
Format: 0 (no) or 1 (yes)
Example: 1
Default: 1
Description: Track the patron's school. If enabled, the corresponding program's 'school' table must be populated with a list of schools.
schoolLabel
useGuardianHeader
guardianHeaderLabel
useGuardianFirstName
requireGuardianFirstName
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the guardian's first name, is it optional or required?
guardianFirstNameLabel
Format: Text
Example: Parent's First Name:
Default: Guardian First Name:
Description: Label for the “guardian first name” field.
useGuardianLastName
requireGuardianLastName
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the guardian's last name, is it optional or required?
guardianLastNameLabel
Format: Text
Example: Parent's Last Name:
Default: Guardian Last Name:
Description: Label for the “guardian last name” field.
useGuardianPhone
requireGuardianPhone
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the guardian's phone, is it optional or required?
guardianPhoneLabel
useGuardianEmail
requireGuardianEmail
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the guardian's e-mail address, is it optional or required?
guardianEmailLabel
Format: Text
Example: Parent's E-mail:
Default: Guardian E-mail Address:
Description: Label for the “guardian e-mail” field.
useGuardianBarcode
requireGuardianBarcode
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking the guardian's barcode, is it optional or required?
guardianBarcodeLabel
Format: Text
Example: Parent's Barcode:
Default: Guardian Barcode:
Description: Label for the “guardian barcode” field.
useConsent
requireConsent
Format: 0 (optional) or 1 (required)
Example: 1
Default: 1
Description: When tracking patron consent, is it optional or required?
consentLabel
consentInfo
Format: Text
Example: I give the library permission to collect this information for summer reading purposes.
Default: I give the library permission to collect this information.
Description: Info fof the “consent” field. (To the right of the checkbox.)
consentError
Format: Text
Example: Please give your consent.
Default: You must give your consent to register.
Description: Error message displayed when the “consent” checkbox is left unchecked.
regSuccessMssg
The program database contains ReadingRecord configuration settings & data for a specific program:
Values used to populate drop-down lists, including: age, city, grade, level, library, school & zipcode.
Data for registered readers.
Data for completed levels.
The program database has 10 tables:
age
city
gender
grade
level
library
reader
record
school
zipcode
ReadingRecord uses 1 program database per configured program (maximum 6). In general, the program database(s) are named using part or all of the hostname portion of the URL, same as the config DB. For example, if the URL is wpl.readingrecord.net, the program DB for program 1 would be 'wpl_1', the program DB for program 2 would be 'wpl_2', and so on.
The age table is used to create the age drop-down list. It must be populated when tracking by age (config.program.useAge=1).
age_id
desc
Format: Text
Example: 18
Default: none
Description: Ages can be specific ages (1, 2, 3), ranges (0-3, 4-6, 7-11), descriptions (Child, Teen, Adult) or just about anything else you can think of.
sort_ord
Format: Integer between 0-99999, must be unique within the age table.
Example: 10
Default: none
Description: Controls sort order of items in the age drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional ages if necessary.
The city table is used to create the city drop-down list. It must be populated when tracking by city (config.program.useCity=1).
city_id
desc
sort_ord
Format: Integer between 0-99999, must be unique within the city table.
Example: 10
Default: none
Description: Controls sort order of items in the city drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional cities if necessary.
The gender table is used to create the gender drop-down list. It must be populated when tracking by gender (config.program.useGender=1).
gender_id
desc
sort_ord
Format: Integer between 0-99999, must be unique within the gender table.
Example: 10
Default: none
Description: Controls sort order of items in the gender drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional genders if necessary.
The grade table is used to create the grade drop-down list. It must be populated when tracking by grade (config.program.useGrade=1).
grade_id
desc
Format: Text
Example: 12th
Default: none
Description: Grades can be specific grades (Preschool, Kindergarten, 1st, 2nd, 3rd), ranges (Elementary, Middle School, High School), descriptions (Completed High School, Some College, Completed College,) or just about anything else you can think of. You may also want to include “NOT IN SCHOOL”, “HOMESCHOOLED” and other special cases.
sort_ord
Format: Integer between 0-99999, must be unique within the grade table.
Example: 10
Default: none
Description: Controls sort order of items in the grade drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional grades if necessary.
The level table is used to populate the completed levels checkboxes & prize instructions. While levels are not strictly required, you will need at least one to generate level statistics and to use the random drawing feature.
level_id
desc
info
sort_ord
Format: Integer between 0-99999, must be unique within the level table.
Example: 10
Default: none
Description: Controls sort order of items on the “track completed levels” page. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional levels if necessary.
The library table is used to create the home library drop-down list. It must be populated when tracking by library (config.program.useLibrary=1).
library_id
desc
sort_ord
Format: Integer between 0-99999, must be unique within the library table.
Example: 10
Default: none
Description: Controls sort order of items in the library drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional libraries if necessary.
The reader table contains data about registered readers and is updated by ReadingRecord. It contains the following columns (fields):
reader_id
date_added
Format: yyyy-mm-dd hh:mm:ss
Example: 2013-01-07 22:15:05
Default: none
Description: Date the registration was added.
date_updated
Format: yyyy-mm-dd hh:mm:ss
Example: 2013-08-06 09:31:58
Default: none
Description: Date the registration was updated by staff.
reg_ip
reg_host
library_id
first_name
last_name
phone
Format: nnn-nnn-nnnn or nnn-nnnn
Example: 123-456-7890 or 123-4567
Default: none
Description: Phone number in 10 or 7 digit format, including spaces.
age_id
bdate
gender_id
city_id
zipcode_id
email
barcode
grade_id
school_id
date_validated
Format: yyyy-mm-dd hh:mm:ss
Example: 2013-01-18 13:42:29
Default: 0000-00-00 00:00:00
Description: Date the reader's registration was marked “valid” by staff, either by checking the “date validated” box on the registration screen or by checking level(s) as complete.
notes
Format: Text
Example: This patron has already been given their level 2 prize, please collect their reading log next time they come to the desk.
Default: none
Description: Notes entered by staff (not visible to patron).
guardian_first_name
guardian_last_name
guardian_phone
Format: nnn-nnn-nnnn or nnn-nnnn
Example: 123-456-7890 or 123-4567
Default: none
Description: Guardian phone number in 10 or 7 digit format, including spaces.
guardian_email
guardian_barcode
consent
The record table contains data about completed levels (reading records, if you will ) and is updated by ReadingRecord. It contains the following columns (fields):
record_id
reader_id
level_id
date_completed
Format: yyyy-mm-dd hh:mm:ss
Example: 2013-01-29 14:27:04
Default: none
Description Date the level was marked as complete.
The school table is used to create the school drop-down list. It must be populated when tracking by school (config.program.useSchool=1).
school_id
desc
Format: Text
Example: Westminster HS
Default: none
Description: Schools can be specific schools (Gregory Hills
MS, Westminster HS, Vocational Tech), districts (District 12, District 50) or just about anything else you can think of. You may also want to include “NOT IN SCHOOL”, “HOMESCHOOLED” and other special cases.
sort_ord
Format: Integer between 0-99999, must be unique within the school table.
Example: 10
Default: none
Description: Controls sort order of items in the school drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional schools if necessary.
The zipcode table is used to create the zipcode drop-down list. It must be populated when tracking by zipcode (config.program.useZipcode=1).
zipcode_id
desc
Format: Text
Example: 80031
Default: none
Description: Zipcode are generally specific zipcodes (80020, 80030, 80031), but can include other data as well.
sort_ord
Format: Integer between 0-99999, must be unique within the zipcode table.
Example: 10
Default: none
Description: Controls sort order of items in the zipcode drop-down list. Note: It is suggested that values be incremented by 10. This makes it easy to change the sort order and/or add additional zipcodes if necessary.