downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoCollection::deleteIndexes> <MongoCollection::createDBRef
Last updated: Fri, 20 Nov 2009

view this page in

MongoCollection::deleteIndex

(PECL mongo >=0.9.0)

MongoCollection::deleteIndexDeletes an index from this collection

Description

public array MongoCollection::deleteIndex ( string|array $keys )

Parameters

keys

Field or fields from which to delete the index.

Return Values

Returns the database response.

Examples

Example #1 MongoCollection::deleteIndex() example

This example passes the function string and array parameters.

<?php
$m 
= new Mongo();
$c $m->selectCollection("example""indices");

// create an index
$c->ensureIndex(array("i"=>1));

// remove a simple index
$c->deleteIndex("i");


// create a multi-key index
$c->ensureIndex(array("j" => 1"k" => 1));

// remove a multi-key index
$c->deleteIndex(array("j" => 1"k" => 1));
?>


add a note add a note User Contributed Notes
MongoCollection::deleteIndex
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites