[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


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:
 ? include("php/header.php");
  
  ibase_pconnect(BANCO,DBUSER,DBPASSWD)
 or die ("script language='javaScript' alert('" . ibase_errmsg() .
 "'); /script");
  
   $stmt = "select count(*) from soldcars";
   $query= ibase_query($stmt) or die ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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 ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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 ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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]




[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] 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]




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:
 ? include("php/header.php");
  
  ibase_pconnect(BANCO,DBUSER,DBPASSWD)
 or die ("script language='javaScript' alert('" . ibase_errmsg() .
 "'); /script");
  
   $stmt = "select count(*) from soldcars";
   $query= ibase_query($stmt) or die ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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 ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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 ("script
 language='javaScript'alert('" . ibase_errmsg() . "'); /script");
   $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]




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 !!

? include("php/header.php");
 
 ibase_pconnect(BANCO,DBUSER,DBPASSWD)
or die ("script language='javaScript' alert('" . ibase_errmsg() . 
"'); /script");
 
  $stmt = "select count(*) from soldcars";
  $query= ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
//  $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 ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $TOTMONTH = $result[0];
  ibase_free_result($query);
 
  $stmt= "select count(*) from deal where available = 1";
  $query   = ibase_query($stmt) or die ("script 
language='javaScript'alert('" . ibase_errmsg() . "'); /script");
  $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]