php-doc-en/reference/mongo/mongocollection/update.xml
Kristina Chodorow f8e05c6db9 added most of the oop stuff for mongo 0.9.0
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@280887 c90b9560-bf6c-de11-be94-00142212c4b1
2009-05-20 22:31:40 +00:00

82 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 1.1 $ -->
<refentry xml:id="mongocollection.update" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>MongoCollection::update</refname>
<refpurpose>Update records based on a given criteria</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier>public</modifier> <type>boolean</type><methodname>MongoCollection::update</methodname>
<methodparam><type>array</type><parameter>criteria</parameter></methodparam>
<methodparam><type>array</type><parameter>newobj</parameter></methodparam>
<methodparam choice="opt"><type>boolean</type><parameter>upsert</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term>
<parameter>criteria</parameter>
</term>
<listitem>
<para>
Description of the objects to update.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>newobj</parameter>
</term>
<listitem>
<para>
The object with which to update the matching records.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>upsert</parameter>
</term>
<listitem>
<para>
If <literal>$newobj</literal> should be inserted if the criteria is not found.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns if the update was successful.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->