Bug #15615 Updated: pg_exec update table sets column to NULL instead of updating it
| From: | derick@php.net | Date: | Tue, 19 Feb 2002 09:48:13 +0000 |
| Subject: | Bug #15615 Updated: pg_exec update table sets column to NULL instead of updating it | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-551@lists.php.net to get a copy of this message | ||
ID: 15615
Updated by: derick@php.net
Reported By: mercy@edsamail.com
-Status: Open
+Status: Bogus
Bug Type: PostgreSQL related
Operating System: Linux
PHP Version: 4.1.1
New Comment:
The bug system is not the appropriate forum for asking support
questions. For a list of a range of more appropriate places to ask
for help using PHP, please visit http://www.php.net/support.php
Previous Comments:
------------------------------------------------------------------------
[2002-02-19 04:45:43] mercy@edsamail.com
im using PHP-WML and i was trying to update a table in postgres with
this:
<?
function edit($id,$nick,$new_nick) {
$sql = "UPDATE address_book SET nick='$new_nick' WHERE id=$id
AND nick='$nick'";
$update = pg_exec($sql);
echo("$sql");
}
?>
OUTPUT ON SCREEN:
UPDATE address_book SET nick='STP' WHERE id=1 AND nick='pearl jam'
PGSQL DATABASE BEFORE:
id | nick | email
----+-----------+------------------------
1 | globedev | mercy@edsamail.com
1 | globedev | jay@edsamail.com
1 | globedev | macky@edsamail.com
1 | globedev | paul@edsamail.com
1 | nirvana | test@edsamail.com
1 | metallica | metallica@edsamail.com
1 | pearl jam | pearl_jam@edsamail.com
PGSQL DATABASE AFTER:
id | nick | email
----+-----------+------------------------
1 | globedev | mercy@edsamail.com
1 | globedev | jay@edsamail.com
1 | globedev | macky@edsamail.com
1 | globedev | paul@edsamail.com
1 | nirvana | test@edsamail.com
1 | metallica | metallica@edsamail.com
1 | | pearl_jam@edsamail.com
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15615&edit=1