new Location - jcobban/Genealogy GitHub Wiki
new Location($parms)
Up: class Location
The constructor for an instance of Location 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('idlr' => integer)
specifies the unique numeric key of the existing record in the table that is to be used to initialize the new instance.array('location' => $locationname)
specifies to either initialize the record from an existing entry which matches the value of 'location' or create a new record for the value.array(array($fieldname => $value, ... ))
if the value of an element in the array $parms is itself an associative array then the fieldname value matches specified in the array are combined by logical OR so that if any of the matches are true the entire expression is true.
The constructor adds error messages to $record->msg
if it is unable to complete due to bad parameters.