Новые книги

Данное пособие является введением в основы программирования на двух языках. Сначала рассматриваются простые примеры на Pascal с описанием алгоритмов на русском языке и использованием графических блок-схем, затем эти же примеры приводятся в программах на C.
The Windows Driver Model has two separate but equally important aspects. First, the core model describes the standard structure for device drivers. Second, Microsoft provides a series of bus and class drivers for common types of devices.

The core WDM model describes how device drivers are installed and started, and how they should service user requests and interact with hardware. A WDM device driver must fit into the Plug and Play (PnP) system that lets users plug in devices that can be configured in software.

Microsoft provides a series of system drivers that have all the basic functionality needed to service many standard types of device. The first type of system driver supports different types of bus, such as the Universal Serial Bus (USB), IEEE 1394 (FireWire) and Audio port devices. Other class drivers implement standard Windows facilities such as Human Input Devices (HID) and kernel streaming. Finally, the Still Image Architecture (STI) provides a framework for handling still images, scanners, etc.

These system class drivers can make it significantly easier to write some types of device driver. For example, the USB system drivers handle all the low-level communications across this bus. A well defined interface is made available to other drivers. This makes it fairly straightforward to issue requests to the USB bus.

pg_affected_rows

Учебник РНР
НазадВперёд

pg_affected_rows

(PHP 4 >= 4.2.0)

pg_affected_rows - возвращает количество задействованных записей (пар/tuples).

Описание

int pg_affected_rows (resource result)

pg_affected_rows() возвращает количество пар (экземпляров/записей/рядов), задействованных в запросах INSERT, UPDATE и DELETE, выполняемых функцией pg_query(). Если ни одна пара не задействована в этой функции, возвращается 0.

Пример 1. pg_affected_rows()
<?php
     $result = pg_query ($conn, "INSERT INTO publisher VALUES ('Author')");
     $cmdtuples = pg_affected_rows ($result);
     echo $cmdtuples . " tuples are affected.";
?>

Примечание: эта функция вызывалась pg_cmdtuples().

См. также pg_query() и pg_num_rows().


Назад Оглавление Вперёд
Функции PostgreSQL Вверхpg_cancel_query