svn: /phpdoc/es/trunk/reference/ cubrid/functions/cubrid-pconnect.xml mongo/mongodb/command.xml

From: Date: Tue, 15 Nov 2011 23:12:47 +0000
Subject: svn: /phpdoc/es/trunk/reference/ cubrid/functions/cubrid-pconnect.xml mongo/mongodb/command.xml
Groups: php.doc.es 
Request: Send a blank email to doc-es+get-5253@lists.php.net to get a copy of this message
seros Tue, 15 Nov 2011 23:12:47 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=319284 Log: Updated to the most recent version Changed paths: U phpdoc/es/trunk/reference/cubrid/functions/cubrid-pconnect.xml U phpdoc/es/trunk/reference/mongo/mongodb/command.xml Modified: phpdoc/es/trunk/reference/cubrid/functions/cubrid-pconnect.xml =================================================================== --- phpdoc/es/trunk/reference/cubrid/functions/cubrid-pconnect.xml 2011-11-15 22:57:17 UTC (rev 319283) +++ phpdoc/es/trunk/reference/cubrid/functions/cubrid-pconnect.xml 2011-11-15 23:12:47 UTC (rev 319284) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 319039 Maintainer: seros Status: ready --> +<!-- EN-Revision: 319222 Maintainer: seros Status: ready --> <!-- Reviewed: no --> <refentry xml:id="function.cubrid-pconnect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> @@ -146,7 +146,7 @@ &reftitle.seealso; <para> <simplelist> - <member><function>cubrid_pconnect</function></member> + <member><function>cubrid_connect</function></member> <member><function>cubrid_connect_with_url</function></member> <member><function>cubrid_pconnect_with_url</function></member> <member><function>cubrid_disconnect</function></member> Modified: phpdoc/es/trunk/reference/mongo/mongodb/command.xml =================================================================== --- phpdoc/es/trunk/reference/mongo/mongodb/command.xml 2011-11-15 22:57:17 UTC (rev 319283) +++ phpdoc/es/trunk/reference/mongo/mongodb/command.xml 2011-11-15 23:12:47 UTC (rev 319284) @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision$ --> -<!-- EN-Revision: 318988 Maintainer: seros Status: ready --> +<!-- EN-Revision: 319248 Maintainer: seros Status: ready --> <!-- Reviewed: no --> <refentry xml:id="mongodb.command" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <refnamediv> @@ -121,14 +121,14 @@ <![CDATA[ <?php -$gente = $db->gente; +$personas = $db->personas; -$gente->insert(array("nombre" => "Joe", "edad" => 4)); -$gente->insert(array("nombre" => "Sally", "edad" => 22)); -$gente->insert(array("nombre" => "Dave", "edad" => 22)); -$gente->insert(array("nombre" => "Molly", "edad" => 87)); +$personas->insert(array("nombre" => "Joe", "edad" => 4)); +$personas->insert(array("nombre" => "Sally", "edad" => 22)); +$personas->insert(array("nombre" => "Dave", "edad" => 22)); +$personas->insert(array("nombre" => "Molly", "edad" => 87)); -$edades = $db->command(array("distinct" => "gente", "key" => "edad")); +$edades = $db->command(array("distinct" => "personas", "key" => "edad")); foreach ($edades['values'] as $edad) { echo "$edad\n"; @@ -145,6 +145,44 @@ </screen> </example> <example> + <title>Ejemplo de <function>MongoDB::command</function> con "distinct"</title> + <para> + Buscar todos los valores distintos de una clave, donde el valor es mayor + o igual a 18. + </para> + <programlisting role="php"> +<![CDATA[ +<?php + +$personas= $db->personas; + +$personas->insert(array("nombre" => "Joe", "edad" => 4)); +$personas->insert(array("nombre" => "Sally", "edad" => 22)); +$personas->insert(array("nombre" => "Dave", "edad" => 22)); +$personas->insert(array("nombre" => "Molly", "edad" => 87)); + +$edades = $db->command( + array( + "distinct" => "personas", + "key" => "edad", + "query" => array("edad" => array('$gte' => 18)) + ) +); + +foreach ($edades['values'] as $edad) { + echo "$edad\n"; +} + +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> + 22 + 87 + </screen> + </example> + <example> <title>Ejemplo de <function>MongoDB::command</function> con MapReduce</title> <para> Obtener todos los usuarios con al menos un evento "sale" (venta), y cuántas veces

« previous php.doc.es (#5253) next »