Location: PHPKode > projects > Aukyla Document Management System > doc/html/a00097.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Database Class Reference</h1><a href="a00010.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Creates database connections and provides some basic functions. 
<p>
This class can be used to create new database connections and to manage existing connections. 
<p>

<p>
Definition at line <a class="el" href="a00210.html#l00032">32</a> of file <a class="el" href="a00210.html">Database.php</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#a0">__construct</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#a1">__destruct</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00097.html#e0">connection</a> ($type, $server, $database, $username, $password)</td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a0" doxytag="Database::__construct"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Database::__construct           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor.<p>
You do not have to instantiate this class yourself, instead you can use the static functions provided by this class.
<p>
Definition at line <a class="el" href="a00210.html#l00040">40</a> of file <a class="el" href="a00210.html">Database.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="Database::__destruct"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Database::__destruct           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="mdname1" valign="top" nowrap>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Destructor.<p>
Closes all managed database connections.
<p>
Definition at line <a class="el" href="a00210.html#l00050">50</a> of file <a class="el" href="a00210.html">Database.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="e0" doxytag="Database::connection"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">Database::connection           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname" nowrap> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>server</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>database</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>password</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [static]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Selects a database connection.<p>
Returns the specified database connection. The function will check whether this connection already exists and if so, returns the connection. If the connection does not yet exist, it will try to establish it.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>The type of database to connect to, for example 'MySQL'. An appropriate <a class="el" href="a00098.html">DatabaseHandler</a> needs to be installed to handle this type of database. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>server</em>&nbsp;</td><td>The server on which the database is running. This can be an IP address or a hostname. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>database</em>&nbsp;</td><td>The name of the actual database to select on the server when connected. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>Username used to authenticate to the database server. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>The user's password to authenticate to the database server. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>A <a class="el" href="a00098.html">DatabaseHandler</a> object with an established connection to the specified database or <code>false</code> if no connection could be established.</dd></dl>

<p>
Definition at line <a class="el" href="a00210.html#l00078">78</a> of file <a class="el" href="a00210.html">Database.php</a>.
<p>
References <a class="el" href="a00235.html#l00087">String::stripSpecialChars()</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00210.html">Database.php</a></ul>
    </div>
  </body>
</html>
Return current item: Aukyla Document Management System