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/ovrimos-fetch-into.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/ovrimos-fetch-into.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/ovrimos-fetch-into.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/ovrimos-fetch-into.html on line 46



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

ovrimos_fetch_into

(PHP 4 >= 4.0.3)

ovrimos_fetch_into - извлекает ряд из результирующего набора.

Описание

bool ovrimos_fetch_into (int result_id, array result_array [, string how [, int rownumber]])

ovrimos_fetch_into() извлекает ряд из результирующего набора в 'result_array', который должен передаваться по ссылке. То, какой ряд извлекается, определяется двумя последними параметрами. 'how' - это один из: 'Forward' (default), 'Назад', 'First', 'Last', 'Absolute', соответствующих направлениям от текущей позиции вперёд, назад, вперёд от начала, назад от конца и абсолютной позиции от начала (эквивалент 'first', но требует 'rownumber'). Регистр не имеет значения. 'Rownumber' это параметр по выбору, кроме абсолютного позиционирования, где необходим. Возвращает TRUE или FALSE.

Пример 1. Пример извлечения
<?php
$conn=ovrimos_connect ("neptune", "8001", "admin", "password");
if ($conn!=0) {
    echo "Connection ok!";
    $res=ovrimos_exec ($conn,"select table_id, table_name from sys.tables");
    if ($res != 0) {
        echo "Statement ok!";
        if (ovrimos_fetch_into ($res, &$row)) {
            list ($table_id, $table_name) = $row;
            echo "table_id=".$table_id.", table_name=".$table_name."\n";
            if (ovrimos_fetch_into ($res, &$row)) {
                list ($table_id, $table_name) = $row;
                echo "table_id=".$table_id.", table_name=".$table_name."\n";
            } else {
                echo "Next: error\n";
            }
        } else {
            echo "First: error\n";
        }
        ovrimos_free_result ($res);
    }
    ovrimos_close($conn);
}
?>

В этом примере извлекается ряд.


Назад Оглавление Вперёд
ovrimos_execute Вверхovrimos_fetch_row


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/ovrimos-fetch-into.html on line 168

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/ovrimos-fetch-into.html on line 168

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/ovrimos-fetch-into.html on line 294

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/ovrimos-fetch-into.html on line 294