Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2b917e0437961edec048f1d15e2d7449 > files > 9935

php-manual-en-7.2.11-1.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Gets a database</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongoclient.selectcollection.html">MongoClient::selectCollection</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongoclient.setreadpreference.html">MongoClient::setReadPreference</a></div>
 <div class="up"><a href="class.mongoclient.html">MongoClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="mongoclient.selectdb" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">MongoClient::selectDB</h1>
  <p class="verinfo">(PECL mongo &gt;=1.3.0)</p><p class="refpurpose"><span class="refname">MongoClient::selectDB</span> &mdash; <span class="dc-title">Gets a database</span></p>

 </div>

 <div id="mongoclient.selectdb-soft-deprecation-notice" class="soft-deprecation-notice">
  <p class="para">This extension that defines this method
is deprecated. Instead, the <a href="set.mongodb.html" class="link">MongoDB</a> extension should be used.
There is no equivalent for this method in the new extension, but there is an
alternative in the <a href="mongodb.overview.html" class="link">PHP library</a>:</p>
  <ul class="simplelist">
   <li class="member"><a href="https://docs.mongodb.com/php-library/master/reference/method/MongoDBClient-selectDatabase/" class="link external">&raquo;&nbsp;MongoDB\Client::selectDatabase()</a></li>
  </ul>
 </div>

 <div class="refsect1 description" id="refsect1-mongoclient.selectdb-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type"><a href="class.mongodb.html" class="type MongoDB">MongoDB</a></span> <span class="methodname"><strong>MongoClient::selectDB</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>
   )</div>

 </div>


 <div class="refsect1 parameters" id="refsect1-mongoclient.selectdb-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    
     <dt>

      <code class="parameter">name</code>
     </dt>

     <dd>

      <p class="para">
       The database name.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-mongoclient.selectdb-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns a new database object.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-mongoclient.selectdb-errors">
  <h3 class="title">Errors/Exceptions</h3>
  <p class="para">
   Throws <a href="class.exception.html" class="classname">Exception</a> if the database name is invalid.
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="mongoclient.selectcollection.html">MongoClient::selectCollection</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="mongoclient.setreadpreference.html">MongoClient::setReadPreference</a></div>
 <div class="up"><a href="class.mongoclient.html">MongoClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>