Inserts one or multiple relations in the database.
Method Syntax
$db->insertRelation($thing,$data)
Arguments
Arguments
Type
Description
thing
string or Table
Target table to insert the relation to.
data
array
An array of relations to insert.
Example usage
// Insert a single relation $relation=$db->insertRelation('person',[ "id"=>newRecordId('person','tobie'), "in"=>newRecordId('company','surreal'), "out"=>newRecordId('role','founder'), ]);