I usually declare $db as global in the function, so I can just execute the
function and continue with my querys.


--
Plutarck
Should be working on something...
...but forgot what it was.


"Kurth Bemis" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> i'm trying to make all my include files into functions for
> manageability.  I have one function that i'd like to get to work.....heres
> teh code..
>
> <?php
> $db = mysql_pconnect("localhost", "user" ,"pass");
> mysql_select_db("database",$db);
> ?>
>
> i had it in a function and had the function return $db.....but didn't
> work.....any ideas?
>
> ~kurth
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to