Warning: include(../lntop.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 19

Warning: include() [function.include]: Failed opening '../lntop.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 19

Warning: include(../levoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 46

Warning: include() [function.include]: Failed opening '../levoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 46



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

ifx_affected_rows

(PHP 3>= 3.0.3, PHP 4)

ifx_affected_rows - получает количество рядов, задействованных в запросе.

Описание

int ifx_affected_rows (int result_id)

result_id это правильный id результата, возвращённый функциями ifx_query() или ifx_prepare().

Возвращает количество рядов, задействованных в запросе, ассоциированном с result_id.

Для insert, update и delete количество является реальным числом (sqlerrd[2]) использованных рядов. Для select оно является приблизительным (sqlerrd[0]). Не полагайтесь на него. Сервер БД никогда не сможет возвратить фактическое количество рядов, возвращённых оператором SELECT, поскольку он даже не начинал их извлечение на этом этапе (только после "PREPARE", когда оптимизатор определили план запроса).

Используется после ifx_prepare() для ограничения запросов рациональными результирующими наборами.

См. также ifx_num_rows().

Пример 1. Задействованные ряды Informix
$rid = ifx_prepare ("select * from emp 
                     where name like " . $name, $connid);
if (! $rid) {
    ... error ...
}
$rowcount = ifx_affected_rows ($rid);
if ($rowcount > 1000) {
    printf ("Too many rows in result set (%d)\n<br>", $rowcount);
    die ("Please restrict your query<br>\n");
}

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


Warning: include(../pravoe_menu.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 154

Warning: include() [function.include]: Failed opening '../pravoe_menu.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 154

Rambler's Top100
© 2009 Тест скорости интернета |  Boont.Ru

Warning: include(../lnbottom.php) [function.include]: failed to open stream: No such file or directory in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 280

Warning: include() [function.include]: Failed opening '../lnbottom.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/prime/data/www/prime-speed.ru/Manual_PHP_4/f/ifx-affected-rows.html on line 280