|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-27 20:40 UTC] waldschrott@php.net
[2000-08-23 09:53 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 09:00:01 2025 UTC |
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.