note 119001 added to class.mongodb-driver-query

From: Date: Tue, 15 Mar 2016 12:11:01 +0000
Subject: note 119001 added to class.mongodb-driver-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-205167@lists.php.net to get a copy of this message
Careful with your filter here - integers and strings are different. With a string ID '1000', this query will mysteriously return 0 results; wasted time figuring out what was going on: $query = new MongoDB\Driver\Query(['_id' => 1000]); This will work: $query = new MongoDB\Driver\Query(['_id' => '1000']); Would be nice if the library could handle this. ---- Server IP: 72.52.91.14 Probable Submitter: 81.174.235.105 ---- Manual Page -- http://php.net/manual/en/class.mongodb-driver-query.php Edit -- https://master.php.net/note/edit/119001 Del: integrated -- https://master.php.net/note/delete/119001/integrated Del: useless -- https://master.php.net/note/delete/119001/useless Del: bad code -- https://master.php.net/note/delete/119001/bad+code Del: spam -- https://master.php.net/note/delete/119001/spam Del: non-english -- https://master.php.net/note/delete/119001/non-english Del: in docs -- https://master.php.net/note/delete/119001/in+docs Del: other reasons-- https://master.php.net/note/delete/119001 Reject -- https://master.php.net/note/reject/119001 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205167) next »