preventing too many database connections
<p>I have an include file for my database connections that has the following code:</p>

<pre><code>$my_db_link = mysql_connect('my_host', 'my_username', 'my_password');
if (!$my_db_link) {
    die('Could not connect: ' . mysql_error());
}

$my_db_name = 'my_database';
mysql_select_db($my_db_name);
</code></pre>

<p>Will it make a difference if I use include_once() rather than include(), or require_once() rather than require()? We had a recent "too many connections" error ("PHP Warning:  mysql_connect() [function.mysql-connect]: Too many connections ") and I'm wondering if using include() created more connections than necessary.</p>

<pre><code>include_once('my_db_connect.php');
</code></pre>

<p>instead of </p>

<pre><code>include('my_db_connect.php');
</code></pre>
