Documentation Home
MySQL PHP API
Download this Manual
PDF (US Ltr) - 2.4Mb
PDF (A4) - 2.4Mb
HTML Download (TGZ) - 250.9Kb
HTML Download (Zip) - 258.4Kb


MySQL PHP API  /  ...  /  CollectionModify::patch

5.10.7 CollectionModify::patch

Copyright 1997-2019 the PHP Documentation Group.

  • CollectionModify::patch

    Patch document

Description

public mysql_xdevapi\CollectionModify mysql_xdevapi\CollectionModify::patch(string document);

Takes a patch object and applies it on one or more documents, and can update multiple document properties.

Warning

This function is currently not documented; only its argument list is available.

Parameters

document

A document with the properties to apply to the matching documents.

Return Values

A CollectionModify object.

Examples

Example 5.46 mysql_xdevapi\CollectionModify::patch example

<?php

$res = $coll->modify('"Programmatore" IN job')->patch('{"Hobby" : "Programmare"}')->execute();

?>