PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Ehsan Razm khah   PHP MongoDB Collection   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: this is how u can use this class
Class: PHP MongoDB Collection
Find, insert, delete, update MongoDB collections
Author: By
Last change:
Date: 9 years ago
Size: 370 bytes
 

Contents

Class file image Download
$dal = new MongoDAL;
 $dal->db_connect("Rss_feeder");// database name
 
$items = array("id"=>"2","url"=>"foo");
 $dal->db_insert("cl_links",$items);

 $dal->db_delete("cl_links",array("id"=>"1"));
 
$dal->db_update("cl_links",array("id"=>"1"),array("id"=>"1","url"=>"ehsan"),true);
 $a = $dal->db_find("cl_links",array("id"=>true,"url"=>true),array("id"=>"2"));