How to retrieve how many rows are affected after doing an INSERT statement

Поиск
Список
Период
Сортировка
От jing han
Тема How to retrieve how many rows are affected after doing an INSERT statement
Дата
Msg-id 20050412154124.83434.qmail@web53502.mail.yahoo.com
обсуждение исходный текст
Ответы Re: How to retrieve how many rows are affected after doing an INSERT statement
Re: How to retrieve how many rows are affected after doing an INSERT statement
Список pgsql-interfaces
Hello,

When we use PostgreSQL with Perl, we can retrieve
Error messages from database handler, say, if my
database handler is presented as $dbh, then I use
$dbh->errstr() can get error message like:

ERROR: Cannot insert a duplicate key into unique index
a_dbtable_pkey.

Is there a way to retriever from $dbh how many rows
are affected after doing an insert statement, and how
to present this? 

I tried $dbh->rowcount(), it doesn't work, So what's
the exact expression?

Any help will be appreciated.


jing 

    
__________________________________ 
Yahoo! Mail Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: mps@theintraweb.net
Дата:
Сообщение: Re: pg.py under Mac OS X
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: How to retrieve how many rows are affected after doing an INSERT statement