Doc #52220 [Asn->Csd]: mongodb update not work
| From: | kristina@php.net | Date: | Sun, 15 Aug 2010 15:54:13 +0000 |
| Subject: | Doc #52220 [Asn->Csd]: mongodb update not work | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-4868@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52220&edit=1
ID: 52220
Updated by: kristina@php.net
Reported by: renziming29 at 163 dot com
Summary: mongodb update not work
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Unknown/Other Function
Operating System: windows 2003
PHP Version: 5.2.13
Assigned To: kristina
Block user comment: N
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Cool. Don't worry, a lot of people do that.
Previous Comments:
------------------------------------------------------------------------
[2010-08-15 10:30:22] renziming29 at gmail dot com
the id must be int
but i make it the string
so i wrong.
------------------------------------------------------------------------
[2010-08-12 15:55:44] kristina@php.net
I think you have a type mismatch, probably. Is the ID field a string or
an integer? Can you paste a sample document?
(var_dump($comname->findOne());)
------------------------------------------------------------------------
[2010-08-10 03:34:19] philip@php.net
Kristina, does this make sense to you?
------------------------------------------------------------------------
[2010-07-01 12:41:09] renziming29 at 163 dot com
Description:
------------
$m2 = new Mongo("127.0.0.1:27017");
$db2 = $m2 -> TestData;
$comname = $db2 -> TestCom;
$newdata = array('$set' => array("ComName"=>"qwert"));//$cname
$comname -> update(array('ID' => "1419518423"),$newdata);
not modify
???
没æä¿®æ¹æå
Test script:
---------------
1.
$m2 = new Mongo("127.0.0.1:27017");
$db2 = $m2 -> TestData;
$comname = $db2 -> TestCom;
$newdata = array('$set' => array("ComName"=>"qwert"));//$cname
$comname -> update(array('ID' => "1419518423"),$newdata);
not modify
2.
$query = array('ID' => $comid);
//##$cursor = $comname -> find($query);//NULL
//@@$cursor = $comname -> find();
the @@ line is work
the ## line is not wok
???
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52220&edit=1