JezK
Edit File: connect.php
<?php //phpinfo(); // connect to mongodb $m = new MongoClient(); //echo "Connection to database successfully"; // select a database $db = $m->kaburu; //echo "</br>Database emp selected"; $collection = $db->terms_conditions; // $cursor = $collection->find(); // $collection1 = $db->customer1; // $cursor1 = $collection1->find(); //inserting record /* $i=0; foreach ($cursor as $document) { echo "\n"; echo '<br/>'.$id[$i] = ($document['_id']->{'$id'}); $k = '587c966e24fe8a5c1f3c9869'; if($id[$i] == $k) { $query = array('_id'=>new MongoId($k)); $cursor1 = $collection->find($query); foreach($cursor1 as $doc) { print_r($doc); } } $i++; echo "\n"; } $i=0; foreach ($cursor1 as $document1) { echo "\n"; //print_r($document1); if($id[$i] == ($document1['customerid'])) { print_r($document1); echo "\n"; } $i++; } //retreiving records $cursor1 = $collection->find(); $cursor1->skip(1); $cursor1->limit(2); //$cursor1->addOption( '$maxScan', 1 ); echo "<pre>"; foreach ($cursor1 as $document) { print_r($document); echo "\n"; }*/ // $document = array("name"=>"ప్రత్యేకం"); // $collection->insert($document); //$uid = $document["_id"]; $cursor1 = $collection->find(); foreach ($cursor1 as $document) { $id = $document['_id']->{'$id'}; } $query = array("_id"=>$id); $query = array("_id" => new MongoId($id)); $fields = array("description"=>"<p>మా వెబ్సైట్ టర్మ్స్ అండ్ కండీషన్స్ టెంప్లేట్ హాస్ బిన్ డిసైండ్ ఫోర్ యూస్ ఓం టిపికల్ వెబ్సైట్స్, ఇంక్లూడింగ్ దోస్ విత్ విత్ బేసిక్ ఇంటర్యాక్టివ్ ఫీచర్స్.<br> దీస్ టర్మ్స్ అండ్ కండీషన్స్ ఇంక్లూడ్, అమాంగ్స్ట్ అదర్ థింగ్స్, ఆ లైసెన్స్ స్పెసిఫైయింగ్ హౌ తే వెబ్సైట్ మే బే యూస్డ్, ఆ డిస్క్లేమర్ ఒఫ్ లైయబిలిటీ, ఆ స్ట్యాచుటరీ డిస్క్లోషర్స్ సెక్షన్ అండ్ రూల్స్ ఓం యూసర్-కాంట్రిబ్యూటెడ్ కాంటెంట్. తీస్ డాక్యుమెంట్ ఇస్ ఆన్ ఎక్స్టెండెడ్ వర్షన్ ఒఫ్ ఔర్ వెబ్సైట్ డిస్క్లేమర్ డాక్యుమెంట్. తే టర్మ్స్ అండ్ కండీషన్స్ అరె ఇన్సఫీషియెంట్ ఫోర్ ఆ వెబ్సైట్ సెల్లింగ్ ప్రాడక్ట్స్ ఒర్ సర్వీసస్. ఫోర్ ఆ కంప్లీట్ సెట్ ఒఫ్ డాక్యుమెంట్స్ ఫోర్ ఆన్ ఆన్లైన్ స్టోర్, సీ ఔర్ ఆన్లైన్ షాప్ ప్యాక్స్.</p>"); $collection->update($query,array('$set'=>$fields)); ?>