[PHP-DB] New PHP or Firebird behavior?

2003-03-20 Thread Mauricio Junqueira
Hello,
I have been using php --with-interbase for some time
and I enjoy using php scripts to everything so I did
some small scripts to use as a datapump to the interbase.
My scripts relay on the fact that I can have two
simultaneos connections to the different databases
in order to pump data from one to another.
Since I allways update my CGI version of php e also
I am using the latest stable version of firebird, I
believe that something has happend that changed the
behavior of my php scrips.
Now, when I do the second connection, everything looks
like the second one takes command over the first one.
I could verify this with some changes in my script.

Does anyone knows about such behavior?

I may post my script if anyone is interested,
but there is nothing really special about it besides
two connections to the interbase.
By the way, I am using persistent connections.
Thank you!



_
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] interbase/firebird - There was a time with multiple conections

2003-03-13 Thread Mauricio Junqueira
Hello,
I have been using php --with-interbase for some time
and I enjoy using php scripts to everything so I did
some small scripts to use as a datapump to the interbase.
My scripts relay on the fact that I can have two
simultaneos connections to the different databases
in order to pump data from one to another.
Since I allways update my CGI version of php e also
I am using the latest stable version of firebird, I
believe that something has happend that changed the
behavior of my php scrips.
Now, when I do the second connection, everything looks
like the second one takes command over the first one.
I could verify this with some changes in my script.

Does anyone knows about such behavior?

I may post my script if anyone is interested,
but there is nothing really special about it besides
two connections to the interbase.
By the way, I am using persistent connections.
Thank you!



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] inet_error: connect errno = 111

2001-04-14 Thread Mauricio Junqueira

I am trying to start the server and it returns the following in the
interbase.log.

ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001
INET/inet_error: connect errno = 111
 
ns1.mautec.com (Client) Sat Apr 14 22:06:05 2001
/opt/interbase/bin/ibguard: guardian starting bin/ibserver
 
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
INET/inet_error: read errno = 104
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
INET/inet_error: receive in try_connect errno = 104
 
ns1.mautec.com (Client) Sat Apr 14 22:06:20 2001
/opt/interbase/bin/ibguard: bin/ibserver normal shutdown.

I have been using interbase super server before but in the
SuSe 7.1 with 2.2.18 without any problems.

I have tried the rpm and the tar installation with the
same results...

Can anyone help me out?


-- 
PHP Database 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-DB] how many queries?

2001-04-06 Thread Mauricio Junqueira


Hi,
I was wondering what would be the main concern
about doing several queries using different variables
without freeing the result... 
just wast of memory or any more serious damage
on the way?

-- 
PHP Database 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]




Re: [PHP-DB] error code = -504 Cursor unknow

2001-04-06 Thread Mauricio Junqueira

Mauricio Junqueira wrote:

> Mauricio Junqueira wrote:
> 
>> 
>> Hello, this is my first attempt to query and print a result coming from a
>> database, in this case interbase6.
>> 
>> I got the following error: InterBase: Dynamic SQL Error SQL error code =
>> -504 Cursor unknown in maingeral.htm on line 8
>> 
>> Here's the code:
>> >  
>>  ibase_pconnect(BANCO,DBUSER,DBPASSWD)
>> or die (" alert('" . ibase_errmsg() .
>> "'); ");
>>  
>>   $stmt = "select count(*) from soldcars";
>>   $query= ibase_query($stmt) or die ("> language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>>   $result   = ibase_fetch_row($query);// THIS IS LINE 8
>>   $TOTSOLD  = $result;
>>   ibase_free_result($query);
>>  
>>   $stmt="select Total from monthsold";
>>   $query   = ibase_query($stmt) or die ("> language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>>   $result  = ibase_fetch_row($query);
>>   $TOTMONTH = $result[0];
>>   ibase_free_result($query);
>>  
>>   $stmt= "select count(*) from deal where available = 1";
>>   $query   = ibase_query($stmt) or die ("> language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>>   $result  = ibase_fetch_row($query);
>>   $TOTAVAIL= $result[0];
>>   ibase_free_result($query);
>>  
>>   ibase_commit();
>>   ibase_close();
>> ?>


Missed piece: $dbh = ibase_pconnect(BANCO,DBUSER,DBPASSWD) 
 and  $query=ibase_query($dbh,$stmt) or die .





-- 
PHP Database 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]




Re: [PHP-DB] column names

2001-04-03 Thread Mauricio Junqueira

Meir kriheli wrote:

> On Tuesday 03 April 2001 23:10, Mauricio Junqueira wrote:
>> HI,
>>
>> does anyone knows how to retrive information about the columns names of a
>> table?
>> I know that is possible to use show table mytable using isql but
>> I need to get information about the columns using sql.
>> that information is to be accessed with a php script. so, I'm looking
>> for something resembling "select info from table"
>>
>> How may I supposed to do that?
> 
> Hi Mauricio,
> 
> I guess you're using Interbase (isql).
> 
> The system table your looking for is named RDB$RELATION_FIELDS
> 
> Your select should be something like:
> 
> select RDB$FIELD_NAME from RDB$RELATION_FIELDS where
> RDB$RELATION_NAME = 'your_table_name'
> 
> I'm building a new system, and I don't have an installation of Interbase
> I can check this on. I've got it from the Interbase documentation (the
> LANGREF.pdf file).
> 
> HTH

Thank you so much, 
It was exactly what I was looking for.
I will now give deep look on those system tables.

-- 
PHP Database 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-DB] column names

2001-04-03 Thread Mauricio Junqueira


HI,

does anyone knows how to retrive information about the columns names of a 
table?
I know that is possible to use show table mytable using isql but
I need to get information about the columns using sql.
that information is to be accessed with a php script. so, I'm looking
for something resembling "select info from table" 

How may I supposed to do that?



-- 
PHP Database 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]




Re: [PHP-DB] error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira

Since ibase_query returns true if the query succeeds I've tried this, but 
with the same problem with ibase_fetch_row:

  $stmt = "select count(*) from soldcars";
  if ($query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ")){
$result   = ibase_fetch_row($query);
$TOTSOLD  = $result[0];
ibase_free_result($query);}


Anyone?


-- 
PHP Database 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]




Re: [PHP-DB] error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira

If just comment the following lines, everything works Please help... 
I'm getting nut !!

 alert('" . ibase_errmsg() . 
"'); ");
 
  $stmt = "select count(*) from soldcars";
  $query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
//  $result   = ibase_fetch_row($query);
//  $TOTSOLD  = $result[0];
//  ibase_free_result($query);
$TOTSOLD ="COMMENTED";
 
  $stmt="select Total from monthsold";
  $query   = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
  $TOTMONTH = $result[0];
  ibase_free_result($query);
 
  $stmt= "select count(*) from deal where available = 1";
  $query   = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
  $result  = ibase_fetch_row($query);
  $TOTAVAIL= $result[0];
  ibase_free_result($query);
 
  ibase_close();
?>

-- 
PHP Database 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]




Re: [PHP-DB] error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira

Mauricio Junqueira wrote:

> 
> Hello, this is my first attempt to query and print a result coming from a
> database, in this case interbase6.
> 
> I got the following error: InterBase: Dynamic SQL Error SQL error code =
> -504 Cursor unknown in maingeral.htm on line 8
> 
> Here's the code:
>   
>  ibase_pconnect(BANCO,DBUSER,DBPASSWD)
> or die (" alert('" . ibase_errmsg() .
> "'); ");
>  
>   $stmt = "select count(*) from soldcars";
>   $query= ibase_query($stmt) or die (" language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>   $result   = ibase_fetch_row($query);// THIS IS LINE 8
>   $TOTSOLD  = $result;
>   ibase_free_result($query);
>  
>   $stmt="select Total from monthsold";
>   $query   = ibase_query($stmt) or die (" language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>   $result  = ibase_fetch_row($query);
>   $TOTMONTH = $result[0];
>   ibase_free_result($query);
>  
>   $stmt= "select count(*) from deal where available = 1";
>   $query   = ibase_query($stmt) or die (" language='javaScript'>alert('" . ibase_errmsg() . "'); ");
>   $result  = ibase_fetch_row($query);
>   $TOTAVAIL= $result[0];
>   ibase_free_result($query);
>  
>   ibase_commit();
>   ibase_close();
> ?>
> 
> I have 3 query blocks. the result shows the contents of 2nd and 3rd block
> variable:TOTMONH and TOTAVAIL but nothing from the first block, TOTSOLD.
> If I comment the first block entirely, I got the same error
> (ibase_fetch_row line) on the 2nd block and the only result that appear is
> from the 3rd block.
> 
> What I am doing wrong?
> 
I've put this statement before the first block to see if $query was empty 
but the statement return true and the same error occured in the 
ibase_fetch_row line

 if (isset($query)) {
  $result   = ibase_fetch_row($query);
  $TOTSOLD  = $result;
  ibase_free_result($query);
  } else echo "query not set";

-- 
PHP Database 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-DB] error code = -504 Cursor unknow

2001-03-27 Thread Mauricio Junqueira


Hello, this is my first attempt to query and print a result coming from a 
database, in this case interbase6.

I got the following error: InterBase: Dynamic SQL Error SQL error code = 
-504 Cursor unknown in maingeral.htm on line 8

Here's the code: 
 alert('" . ibase_errmsg() . 
"'); ");
 
  $stmt = "select count(*) from soldcars";
  $query= ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
  $result   = ibase_fetch_row($query);// THIS IS LINE 8
  $TOTSOLD  = $result;
  ibase_free_result($query);
 
  $stmt="select Total from monthsold";
  $query   = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
  $result  = ibase_fetch_row($query);
  $TOTMONTH = $result[0];
  ibase_free_result($query);
 
  $stmt= "select count(*) from deal where available = 1";
  $query   = ibase_query($stmt) or die ("alert('" . ibase_errmsg() . "'); ");
  $result  = ibase_fetch_row($query);
  $TOTAVAIL= $result[0];
  ibase_free_result($query);
 
  ibase_commit();
  ibase_close();
?>

I have 3 query blocks. the result shows the contents of 2nd and 3rd block 
variable:TOTMONH and TOTAVAIL but nothing from the first block, TOTSOLD.
If I comment the first block entirely, I got the same error 
(ibase_fetch_row line) on the 2nd block and the only result that appear is 
from the 3rd block.

What I am doing wrong?

-- 
PHP Database 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]