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::unset

5.9.12 CollectionModify::unset

Copyright 1997-2019 the PHP Documentation Group.

  • CollectionModify::unset

    Unset the value of document fields

Description

public mysql_xdevapi\CollectionModify mysql_xdevapi\CollectionModify::unset(array fields);

Removes attributes from documents in a collection.

Warning

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

Parameters

fields

The attributes to remove from documents in a collection.

Return Values

CollectionModify object that can be used for further processing.

Examples

Example 5.50 mysql_xdevapi\CollectionModify::unset example

<?php

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

?>