mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
DB::command and date fields
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@281414 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
f16b57bc6b
commit
0ff6415f9d
3 changed files with 11 additions and 32 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
|
||||
<chapter xml:id="mongo.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
&reftitle.examples;
|
||||
|
@ -35,9 +35,8 @@ $collection->insert($obj);
|
|||
$cursor = $collection->find();
|
||||
|
||||
// iterate through the results
|
||||
while( $cursor->hasNext() ) {
|
||||
$c = $cursor->next();
|
||||
echo $c["title"] . "\n";
|
||||
foreach ($cursor as $obj) {
|
||||
echo $obj["title"] . "\n";
|
||||
}
|
||||
|
||||
// disconnect
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
|
||||
<phpdoc:classref xml:id="class.mongodate" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
|
@ -14,6 +14,9 @@
|
|||
<para>
|
||||
Represent date objects for the database.
|
||||
</para>
|
||||
<para>
|
||||
Includes second (sec) and microsecond (usec) fields.
|
||||
</para>
|
||||
</section>
|
||||
<!-- }}} -->
|
||||
|
||||
|
|
|
@ -1,35 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry xml:id="mongoutil.dbcommand" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refentry xml:id="mongodb.command" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>MongoUtil::dbCommand</refname>
|
||||
<refpurpose>Execute a db command</refpurpose>
|
||||
<refname>MongoDB::command</refname>
|
||||
<refpurpose>Execute a database command</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<modifier>public</modifier> <modifier>static</modifier> <type>array</type><methodname>MongoUtil::dbCommand</methodname>
|
||||
<methodparam><type>resource</type><parameter>conn</parameter></methodparam>
|
||||
<modifier>public</modifier> <type>array</type><methodname>MongoDB::command</methodname>
|
||||
<methodparam><type>array</type><parameter>data</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>db</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<type>resource</type>
|
||||
<parameter>conn</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
Database connection.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>data</parameter>
|
||||
|
@ -40,16 +27,6 @@
|
|||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<parameter>db</parameter>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
The database name.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
Loading…
Reference in a new issue