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::sortmysql_xdevapi\CollectionRemove>
^mysql_xdevapi\CollectionModifyLast updated: Mon, 26 Oct 2026

CollectionModify::unset

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

CollectionModify::unset — Unset the value of document fields

Description

public function mysql_xdevapi\CollectionModify::unset(array $fields): mysql_xdevapi\CollectionModify

Removes attributes from documents in a collection.

Parameters

fields

The attributes to remove from documents in a collection.

Return Values

CollectionModify object that can be used for further processing.

Examples

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

<?php

$res = $coll->modify('job like :job_name')->unset(["age", "name"])->bind(['job_name' => 'Plumber'])->execute();

?>

<CollectionModify::sortmysql_xdevapi\CollectionRemove>
^mysql_xdevapi\CollectionModifyLast updated: Mon, 26 Oct 2026