Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<CollectionModify::limitCollectionModify::replace>
^mysql_xdevapi\CollectionModifyLast updated: Mon, 26 Oct 2026

CollectionModify::patch

(No version information available, might only be in Git)

CollectionModify::patch — Patch document

Description

public function mysql_xdevapi\CollectionModify::patch(string $document): mysql_xdevapi\CollectionModify

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

Parameters

document

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

Return Values

A CollectionModify object.

Examples

Example #1 mysql_xdevapi\CollectionModify::patch() example

<?php

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

?>

<CollectionModify::limitCollectionModify::replace>
^mysql_xdevapi\CollectionModifyLast updated: Mon, 26 Oct 2026