note 101006 deleted from class.mongoregex by danbrown

From: Date: Fri, 19 Nov 2010 17:57:06 +0000
Subject: note 101006 deleted from class.mongoregex by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174206@lists.php.net to get a copy of this message
Note Submitter: benyounes dot ousama at gmail dot com ---- // First you must declare and define your regexObj // Here I am looking for all entry of my database // wich is like "%Nicolas%" and the /i param // is used for Insensitive Case $regexObj = new MongoRegex("/^Nicolas/i"); // I attach the regexObj to my Where Condition $where = array("ctname" => $regexObj); // Execute the request $resultset = $this->db->Infos->find($where); // Parsing the results while ($resultset->hasNext()) { $clientObj = $resultset->getNext(); echo "Client Name: ".$clientObj["cname"]."</br>"; }

« previous php.notes (#174206) next »