П О Р Т А Л                            
С Е Т Е В Ы Х                          
П Р О Е К Т О В                        
  
Поиск по сайту:
                                                 
Главная

О проекте

Web-мастеру
     HTML & JavaScript
     SSI
     Perl
     PHP
     XML & XSLT
     Unix Shell

MySQL

Безопасность

Хостинг

Другое








Самое читаемое:

Учебник PHP - "Для Чайника".
Просмотров 3409 раз(а).

Иллюстрированный самоучитель по созданию сайтов.
Просмотров 5958 раз(а).

Учебник HTML.
Просмотров 3202 раз(а).

Руководство по PHP5.
Просмотров 5418 раз(а).

Хостинг через призму DNS.
Просмотров 4018 раз(а).

Подборка текстов стандартных документов.
Просмотров 55710 раз(а).

Учебник PHP - Самоучитель
Просмотров 2995 раз(а).

Документация на MySQL (учебник & справочное руководство)
Просмотров 4569 раз(а).

Внешние атаки...
Просмотров 3732 раз(а).

Учебник PHP.
Просмотров 2767 раз(а).

SSI в примерах.
Просмотров 37384 раз(а).



 
 
| Добавить в избранное | Сделать стартовой | Помощь





Руководство по PHP
Пред. След.

db2_fetch_row

(PECL)

db2_fetch_row --  Sets the result set pointer to the next row or requested row

Описание

bool db2_fetch_row ( resource stmt [, int row_number] )

Use db2_fetch_row() to iterate through a result set, or to point to a specific row in a result set if you requested a scrollable cursor.

To retrieve individual fields from the result set, call the db2_result() function.

Rather than calling db2_fetch_row() and db2_result(), most applications will call one of db2_fetch_assoc(), db2_fetch_both(), or db2_fetch_array() to advance the result set pointer and return a complete row as an array.

Список параметров

stmt

A valid stmt resource.

row_number

With scrollable cursors, you can request a specific row number in the result set. Row numbering is 1-indexed.

Возвращаемые значения

Returns TRUE if the requested row exists in the result set. Returns FALSE if the requested row does not exist in the result set.

Примеры

Пример 1. Iterating through a result set

The following example demonstrates how to iterate through a result set with db2_fetch_row() and retrieve columns from the result set with db2_result().

<?php
$sql
= 'SELECT name, breed FROM animals WHERE weight < ?';
$stmt = db2_prepare($conn, $sql);
db2_execute($stmt, array(10));
while (
db2_fetch_row($stmt)) {
    
$name = db2_result($stmt, 0);
    
$breed = db2_result($stmt, 1);
    print
"$name $breed";
}
?>

Результат выполнения данного примера:

cat Pook
gold fish Bubbles
budgerigar Gizmo
goat Rickety Ride


Пред. Начало След.
db2_fetch_object Уровень выше db2_field_display_size


Если Вы не нашли что искали, то рекомендую воспользоваться поиском по сайту:
 





Copyright © 2005-2016 Project.Net.Ru