how many rows updated

From: Date: Thu, 11 Sep 2003 21:30:49 +0000
Subject: how many rows updated
Groups: php.db 
Request: Send a blank email to php-db+get-30467@lists.php.net to get a copy of this message
When updating or deleting a table is there anyway to find out how many rows where affected using php?? I am using Postgresql 7.2 and php 4.2 using pgsql from the the command line I enter this query update teststock set item_num ='something' where item_num ='something'; and it returns UPDATE someamount in php if i use $result = pg_exec($conn, $query); it just returns whether or not the query failed. I tried this, but it fails because no object was returned from pg_exec() $data = pg_fetch_object ($result, 0); foreach ($data as $varName=>$value) { print "$varName &nbsp; $value <br>"; } Thanks for any help

« previous php.db (#30467) next »