Re: recursion in php and mysql
| From: | bedul | Date: | Fri, 02 Mar 2007 05:13:16 +0000 |
| Subject: | Re: recursion in php and mysql | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-43143@lists.php.net to get a copy of this message | ||
hmm.. i think there something going on on this func
mysql_select_db($database)
read more below
==================================================
----- Original Message -----
From: "Ron Croonenberg" <ronc@depauw.edu>
To: <php-db@lists.php.net>
Sent: Friday, March 02, 2007 11:52 AM
Subject: [PHP-DB] recursion in php and mysql
> Hello all,
>
> I wrote an app in php and it uses recursion.
>
> Problem I have is that when I connect to a database using
> mysql_connect($dbhost, $username, $password); and select a table with
> mysql_select_db($database) I cannot access the table anymore from some
> function.
try this
mysql_select_db($database) or die(mysql_error());
=================================================
> Now I can connect and select a database in that php function but that
> means that process happens A LOT and connecting and selecting everytime
> probably slows down the app quite a bit
>
> Is there a way to connect to a database and select a table "globally"
> so that I have access to it in ever php function I write ?
>
> thanks,
>
> Ron