new Census1901Sched2 - jcobban/Genealogy GitHub Wiki
new Census1901Sched2($parms)
The constructor for an instance of Census takes one parameter:
parameter | description |
---|---|
$parms | identifies the database record to be associated with this instance. This is an associative array. |
$parms may be:
- An associative array containing all of the fields in a record as obtained by a database SELECT.
array('id' => recordid)
specifies the unique identifier of the record in the table that is to be used to initialize the new instance.array('DistrictNumber' => number, 'SubDistId' => string, 'Division' => string, 'PageNum' => number)
specifies the unique identification of the record in the table that is to be used to initialize the new instance.
For example:
$schedline = new Census1901Sched2(array('id' => 1234));
$schedline = new Census1901Sched2(array('districtnumber' => 90,
'subdistid' => 'B',
'division' => '3',
'pagenum' => 1));
// the following gets all of the schedule 2 records for a specific enumeration division.
$schedlines = new RecordSet('Census1901Sched2',
array('districtnumber' => 90,
'subdistid' => 'B',
'division' => '3'));
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.
Next: class CensusSet