PHP 8.5.0 Beta 3 available for testing

CollectionModify::unset

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

CollectionModify::unset โ€” Unset the value of document fields

่ฏดๆ˜Ž

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

Removes attributes from documents in a collection.

ๅ‚ๆ•ฐ

fields

The attributes to remove from documents in a collection.

่ฟ”ๅ›žๅ€ผ

CollectionModify object that can be used for further processing.

็คบไพ‹

็คบไพ‹ #1 mysql_xdevapi\CollectionModify::unset() example

<?php

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

?>
๏ผ‹ๆทปๅŠ ๅค‡ๆณจ

็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจ

ๆญค้กต้ขๅฐšๆ— ็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจใ€‚
To Top