overrated. :)
>
> Bastien Koert wrote:
>> you could make the connection variable global, but the best bet here
>> is to use a class and create a db object that your functions could call
>>
>> Bastien
>>
>>
>>> From: Ron Croonenberg <[EMAIL PROT
l
>
> Bastien
>
>
>> From: Ron Croonenberg <[EMAIL PROTECTED]>
>> To: php-db@lists.php.net
>> Subject: [PHP-DB] recursion in php and mysql
>> Date: Thu, 01 Mar 2007 23:52:54 -0500
>>
>> Hello all,
>>
>> I wrote an app in php and it
ursion in php and mysql
Date: Thu, 01 Mar 2007 23:52:54 -0500
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
It will complain if your query isn't returning any results. Check for
that too.
-Micah
On 03/01/2007 09:36 PM, Ron Croonenberg wrote:
Hi Micah,
thanks I have a bunch of things working now.
mysql_fetch_array() is complaining.
I use it like this:
function recursive() {
global $connection;
$
you could make the connection variable global, but the best bet here is to
use a class and create a db object that your functions could call
Bastien
From: Ron Croonenberg <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] recursion in php and mysql
Date: Thu, 01 Mar 2007 23
source result [, int result_type] )
- Original Message -
From: "Ron Croonenberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc:
Sent: Friday, March 02, 2007 12:36 PM
Subject: Re: [PHP-DB] recursion in php and mysql
Hi Micah,
thanks I have a bunch of things working
Hi Micah,
thanks I have a bunch of things working now.
mysql_fetch_array() is complaining.
I use it like this:
function recursive() {
global $connection;
$result = mysql_query("SELECT * FROM $table WHERE bthb4='$bthb4'", $connection);
$row = mysql_fetch_array($result);
}
the error I got was:
hmm.. i think there something going on on this func
mysql_select_db($database)
read more below
==
- Original Message -
From: "Ron Croonenberg" <[EMAIL PROTECTED]>
To:
Sent: Friday, March 02, 2007 11:52 AM
Subject: [PHP-DB]
Yep, just put the connect function outside your recursive loop. You can
then access the connection that is returned by the connect function by
making it global, or passing it by reference by the recursive function.
In other words:
$connection = mysql_connect();
mysql_select_db($database, $
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.
Now I can connect and select a
10 matches
Mail list logo