note 101006 added to class.mongoregex
| From: | benyounes dot ousama at gmail dot com | Date: | Fri, 19 Nov 2010 17:50:26 +0000 |
| Subject: | note 101006 added to class.mongoregex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174203@lists.php.net to get a copy of this message | ||
// 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>";
}
----
Server IP: 69.147.83.197
Probable Submitter: 193.251.48.202
----
Manual Page -- http://www.php.net/manual/en/class.mongoregex.php
Edit -- https://master.php.net/note/edit/101006
Del: integrated -- https://master.php.net/note/delete/101006/integrated
Del: useless -- https://master.php.net/note/delete/101006/useless
Del: bad code -- https://master.php.net/note/delete/101006/bad+code
Del: spam -- https://master.php.net/note/delete/101006/spam
Del: non-english -- https://master.php.net/note/delete/101006/non-english
Del: in docs -- https://master.php.net/note/delete/101006/in+docs
Del: other reasons-- https://master.php.net/note/delete/101006
Reject -- https://master.php.net/note/reject/101006
Search -- https://master.php.net/manage/user-notes.php