note 108726 added to mongocollection.ensureindex

From: Date: Mon, 21 May 2012 08:07:59 +0000
Subject: note 108726 added to mongocollection.ensureindex
Groups: php.notes 
Request: Send a blank email to php-notes+get-188100@lists.php.net to get a copy of this message
Question is - is there a way to detect if collection exist in PHP Mongo driver so we don't need to do "ensureIndex" every time we use collection ? I'm talking about situation when we have no idea at all if we just created collection or it was created before. If we could do that then our database collection could be changed/created on demand instead of creating it before we need it. ---- Server IP: 61.195.146.164 Probable Submitter: 80.55.112.218 ---- Manual Page -- http://www.php.net/manual/en/mongocollection.ensureindex.php Edit -- https://master.php.net/note/edit/108726 Del: integrated -- https://master.php.net/note/delete/108726/integrated Del: useless -- https://master.php.net/note/delete/108726/useless Del: bad code -- https://master.php.net/note/delete/108726/bad+code Del: spam -- https://master.php.net/note/delete/108726/spam Del: non-english -- https://master.php.net/note/delete/108726/non-english Del: in docs -- https://master.php.net/note/delete/108726/in+docs Del: other reasons-- https://master.php.net/note/delete/108726 Reject -- https://master.php.net/note/reject/108726 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#188100) next »