Re: [PHP] Problems with multiple query

2001-03-19 Thread Nuno Silva
Hi, please note: You can *not* fetch results that require earlier results using the pg_* functions. Explaination: when you submit a query the php script doesn't know about the content of all rows returned, instead the interface API makes use of pointers to fetch only the requested rows from

Re: [PHP] Problems with multiple query

2001-03-18 Thread Luca Lazzeroni
Thanks; in fact I've tryed the second solution and it works for me; but I can't understand why the script stop working during the upgrade of system. The most strange thing is that, after a deeper investigation on the code, I've found the PHP engine does something like closing the connection after

Re: [PHP] Problems with multiple query

2001-03-18 Thread Nuno Silva
Hello, if the second query loops inside a _for_ statement and needs values from the first query you have two options: 1. save all the results from query one to some array and then loop inside the array within the _for_ statement executing new sql; 2. open two separate connections to the databa

[PHP] Problems with multiple query

2001-03-18 Thread Luca Lazzeroni
Hi, I've recently migrated a system with PHP 4.0.3pl1 and PostgreSQL 7.0.2 - RedHat Linux 5.1 (yes 5) to a new one with PHP 4.0.4pl1 - PostgreSQL 7.0.2 - RedHat Linux 7.0. All my database applications work fine except one which does strange things: this is a piece of code: 8<--- CUT