Re: 4.0.4 Postgres link resource bug?

From: Date: Mon, 15 Jan 2001 22:57:04 +0000
Subject: Re: 4.0.4 Postgres link resource bug?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34711@lists.php.net to get a copy of this message
It's b/c the globals in 4.0.4pl1 are not working, at least that's why mine broke. Try replacing the globals in the function with the actual variable declarations and see if the problem goes away. If not, I guess it's a different problem, but that fixed it for me. ----------------------------------------------------------------- Jonathan Rosenberg Be fierce, be fabulous, change the world! ----- Original Message ----- From: <kris@grinz.com> To: <php-general@lists.php.net> Sent: Monday, January 15, 2001 3:21 PM Subject: [PHP] 4.0.4 Postgres link resource bug? > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#34711) next »