Skip to content

new DeathSet

James Cobban edited this page Dec 14, 2019 · 1 revision

new DeathSet($parms)

Up: class DeathSet

The constructor for an instance of DeathSet takes one parameter:

parameter description
$parms identifies the database records to be associated with this instance. This is an associative array.

$parms may be:

  • An associative array of fieldname => value pairs to define the subset of the records in the SQL table that are represented by this instance. The parameters 'offset', 'limit', 'groupby',and 'order' are reserved to set the OFFSET, LIMIT, GROUP BY and ORDER BY clauses.
  • The parameter may also be an array of instances of the class Death to be converted into a RecordSet.
  • If this parameter is omitted, or null, the object contains every record in the table in the default order for the table. However this table contains a very large number of records so you will not be permitted to iterate over them.

The constructor throws an exception or adds error messages to $record->msg if it is unable to complete due to bad parameters.

Examples:

$deathParms	= array(‘regyear'	=> 1871,
		        ‘regnum'	=> array($first, “:$last”);
$deaths		= new DeathSet($getParms);

returns the set of instances of class Death which match the specified year and have a registration number between $first and $last inclusive.

Next: $deathSet->getSummary()

Clone this wiki locally