CollectionModify::unset

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

CollectionModify::unsetUnset the value of document fields

说锟斤拷

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

Removes attributes from documents in a collection.

Warning

锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷

锟斤拷锟斤拷

fields

The attributes to remove from documents in a collection.

锟斤拷锟斤拷值

CollectionModify object that can be used for further processing.

锟斤拷锟斤拷

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

<?php

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

?>