php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #5349 when i work on functional equations, return Resouce ID is anomalos!
Submitted: 2000-07-04 04:12 UTC Modified: 2000-08-23 09:53 UTC
From: gowill at chollian dot net Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 4.0.1pl2 OS: linux2.2.16
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: gowill at chollian dot net
New email:
PHP Version: OS:

 

 [2000-07-04 04:12 UTC] gowill at chollian dot net
When i practice "pg_connect()", Resouce ID is unmethodical,
and if i maintain to operate these equations, same Resource
ID will continuously return.
And because of that, the kind of message is on the screen
as below,

"Warning: 1 is not a valid PostgreSQL link resource in /home/gowill/public_html/test.php on line 19"



I'm sending you some of my testing source.

	 <html> 
             <head></head> 

             <body> 
             <? 

             //##### DB open #1 #### 
             $dbconn = pg_connect("localhost","5432","","","ulsantoday"); 
             if (!$dbconn) { echo("DB error...... #1".$dbconn."");} else { echo("DB ok...... #1".$dbconn.""); } 

             $result = pg_exec($dbconn, "select * from section where sec_code = 'a'"); 
             pg_close($dbconn); 

             //##### DB open #2 #### 
             $dbconn = pg_connect("localhost","5432","","","ulsantoday"); 
             if (!$dbconn) { echo("DB error...... #2".$dbconn."");} else { echo("DB ok...... #2".$dbconn.""); } 

             $result = pg_exec($dbconn, "select * from section where sec_code = 'a'"); 
             pg_close($dbconn); 

             //##### DB open #3 #### 
             $dbconn = pg_connect("localhost","5432","","","ulsantoday"); 
             if (!$dbconn) { echo("DB error...... #3".$dbconn."");} else { echo("DB ok...... #3".$dbconn.""); } 

             $result = pg_exec($dbconn, "select * from section where sec_code = 'a'"); 
             pg_close($dbconn); 


             /* 
             //### for loop
             for($i=6; $i<9; $i++) { 
             $dbconn = pg_connect("localhost","5432","","","ulsantoday"); 
             if (!$dbconn) { echo("DB error...... #".$i.$dbconn."");} else { echo("DB ok...... #".$i.$dbconn.""); } 

             $result = pg_exec($dbconn, "select * from section where sec_code = 'a'"); 
             pg_close($dbconn); 
             } 
             */ 
	 </body>
             </html>



I know you are busy and all.
But it will be really kind of you if you take a look at "pg_connect()".

Thank you.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-07-27 20:40 UTC] waldschrott@php.net
Please verify that it?s still happening using the latest version from CVS or snaps.php.net.
 [2000-08-23 09:53 UTC] sniper@php.net
No feedback from user.

--Jani
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 11:01:32 2025 UTC