how many rows updated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux