<p>A couple of the options are:</p>

<pre><code>$connection = {my db connection/object};

function PassedIn($connection) { ... }

function PassedByReference(&amp;$connection) { ... }

function UsingGlobal() {
    global $connection;
    ...
}
</code></pre>

<p>So, passed in, passed by reference, or using global. I'm thinking in functions that are only used within 1 project that will only have 1 database connection. If there are multiple connections, the definitely passed in or passed by reference.</p>

<p>I'm thining passed by reference is not needed when you are in PHP5 using an object, so then passed in or using global are the 2 possibilities.</p>

<p>The reason I'm asking is because I'm getting tired of always putting in $connection into my function parameters.</p>

None of the above.
All the
```
mysql
```
functions take the database connection argument
optionally
. If you leave that argument out, the last connection by mysql_connect() is assumed.