pg_affected_rows

(PHP 4 >= 4.2.0, PHP 5, PHP 7)

pg_affected_rows������Ӱ��ļ�¼��Ŀ

˵��

pg_affected_rows ( resource $result ) : int

pg_affected_rows() ������ pg_query() ��ִ�� INSERT��UPDATE �� DELETE ��ѯ���ܵ�Ӱ��ļ�¼��Ŀ������ʵ������¼���У������������û��Ӱ�쵽�κμ�¼���򷵻� 0��

Example #1 pg_affected_rows() ����

<?php
$result 
pg_query($conn"INSERT INTO authors VALUES ('Orwell', 2002, 'Animal Farm')");
$cmdtuples pg_affected_rows($result);
echo 
$cmdtuples " tuples are affected.\n";
?>

Note:

��������ǰ����Ϊ pg_cmdtuples()��

�μ� pg_query() �� pg_num_rows()��