<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mysql.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.mysql-get-server-info.php',
    1 => 'mysql_get_server_info',
    2 => 'Liefert Informationen zum MySQL-Server',
  ),
  'up' => 
  array (
    0 => 'ref.mysql.php',
    1 => 'MySQL Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.mysql-get-proto-info.php',
    1 => 'mysql_get_proto_info',
  ),
  'next' => 
  array (
    0 => 'function.mysql-info.php',
    1 => 'mysql_info',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/mysql/functions/mysql-get-server-info.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mysql-get-server-info" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysql_get_server_info</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5)</p><p class="refpurpose"><span class="refname">mysql_get_server_info</span> &mdash; <span class="dc-title">Liefert Informationen zum MySQL-Server</span></p>

 </div>

 <div id="function.mysql-get-server-info-refsynopsisdiv">
  <div class="warning"><strong class="warning">Warnung</strong>
   <p class="para">Diese Erweiterung ist seit PHP 5.5.0 als veraltet markiert und wurde in PHP 7.0.0 entfernt.
Verwenden Sie stattdessen die Erweiterungen <a href="book.mysqli.php" class="link">MySQLi</a> oder <a href="ref.pdo-mysql.php" class="link">PDO_MySQL</a>.
Weitere Informationen bietet der Ratgeber <a href="mysqlinfo.api.choosing.php" class="link">MySQL: Auswahl einer API</a>.
Alternativen zu dieser Funktion umfassen:</p>
   <ul class="simplelist">
    <li><span class="function"><a href="mysqli.get-server-info.php" class="function">mysqli_get_server_info()</a></span></li>
    <li>
     <span class="methodname"><a href="pdostatement.getattribute.php" class="methodname">PDOStatement::getAttribute()</a></span>
     mit <strong><code><a href="pdo.constants.php#pdo.constants.attr-server-version">PDO::ATTR_SERVER_VERSION</a></code></strong> als <code class="parameter">attribute</code>
    </li>
   </ul>
  </div>
 </div>

 <div class="refsect1 description" id="refsect1-function.mysql-get-server-info-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mysql_get_server_info</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$link_identifier</code><span class="initializer"> = NULL</span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

    <p class="simpara">
     Gibt die Version des MySQL-Servers zurück.
    </p>
 </div>


<div class="refsect1 parameters" id="refsect1-function.mysql-get-server-info-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   <dt>
<code class="parameter">link_identifier</code></dt><dd><p class="para">Die MySQL-Verbindung.
Wird die Verbindungskennung nicht angegeben, wird die letzte durch
<span class="function"><a href="function.mysql-connect.php" class="function">mysql_connect()</a></span> geöffnete Verbindung angenommen. Falls
keine solche Verbindung gefunden wird, wird versucht, eine Verbindung
aufzubauen, wie es beim Aufruf von <span class="function"><a href="function.mysql-connect.php" class="function">mysql_connect()</a></span> ohne
Angabe von Argumenten der Fall wäre. Falls zufällig keine Verbindung gefunden
oder aufgebaut werden kann, wird eine Warnung der Stufe
<strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> erzeugt.</p></dd>
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mysql-get-server-info-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Gibt bei Erfolg die Version des MySQL-Servers zurück.
   Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.mysql-get-server-info-examples">
  <h3 class="title">Beispiele</h3>
  <div class="example" id="example-1">
   <p><strong>Beispiel #1 <span class="function"><strong>mysql_get_server_info()</strong></span>-Beispiel</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$link </span><span style="color: #007700">= </span><span style="color: #0000BB">mysql_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'localhost'</span><span style="color: #007700">, </span><span style="color: #DD0000">'mysql_user'</span><span style="color: #007700">, </span><span style="color: #DD0000">'mysql_password'</span><span style="color: #007700">);<br />if (!</span><span style="color: #0000BB">$link</span><span style="color: #007700">) {<br />    die(</span><span style="color: #DD0000">'Keine Verbindung möglich: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">mysql_error</span><span style="color: #007700">());<br />}<br /></span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"Die MySQL-Server-Version: %s\n"</span><span style="color: #007700">, </span><span style="color: #0000BB">mysql_get_server_info</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Das oben gezeigte Beispiel erzeugt
eine ähnliche Ausgabe wie:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Die MySQL-Server Version: 4.0.1-alpha</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.mysql-get-server-info-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.mysql-get-client-info.php" class="function" rel="rdfs-seeAlso">mysql_get_client_info()</a> - Liefert MySQL-Clientinformationen</span></li>
   <li><span class="function"><a href="function.mysql-get-host-info.php" class="function" rel="rdfs-seeAlso">mysql_get_host_info()</a> - Liefert Informationen zum MySQL-Host</span></li>
   <li><span class="function"><a href="function.mysql-get-proto-info.php" class="function" rel="rdfs-seeAlso">mysql_get_proto_info()</a> - Liefert MySQL-Protokollinformationen</span></li>
   <li><span class="function"><a href="function.phpversion.php" class="function" rel="rdfs-seeAlso">phpversion()</a> - Liefert die aktuelle PHP-Version</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>