4.0.4 Postgres link resource bug?
| From: | kris at grinz dot com | Date: | Mon, 15 Jan 2001 20:21:48 +0000 |
| Subject: | 4.0.4 Postgres link resource bug? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-34660@lists.php.net to get a copy of this message | ||
Hi,
I have a script that worked up until I upgraded the server from PHP
4.0.2 to 4.0.4. I get:
1 is not a valid PostgreSQL link resource. Why is this broken all of
a sudden? here is some code:
function SQLCall($call){
global $psqlhost, $psqldb, $rows, $result;
$db_connect=pg_connect("host=$psqlhost
dbname=$psqldb");
$result=pg_exec($db_connect, "$call");
$rows=pg_numrows($result);
}
$call="insert into agents (fname, lname, address, city, state,
zip, email,
country, homephone, workphone, company, username, password,
created, visits, fax, status,
pridomain, title) values ('$fname', '$lname', '$address',
'$city',
'$bizstate',
'$zip', '$email', '$country', '$homephone',
'$workphone', '$company',
'$username',
'$cryptpass', '$created', $visits, '$fax', '$status',
'$pridomain',
'$title')";
SQLCall($call);
include("results/newagent.php");
This (bug?) seems to only affect INSERT calls to pg_sql. The
functions within the script which use UPDATE sql calls (using the
same SQLCall($call) function in this script work fine.
Any ideas?
Thanks,
Kris