cubrid_result
(PECL CUBRID >= 8.3.0)
cubrid_result — Return the value of a specific field in a specific row
Описание
This function returns the value of a specific field in a specific row from a result set.
Список параметров
-
result
-
result
comes from a call to cubrid_execute() -
row
-
The row number from the result that is being retrieved. Row numbers start at 0.
-
field
-
The name or offset of the
field
being retrieved. It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved.
Возвращаемые значения
Value of a specific field, on success (NULL if value if null).
FALSE
on failure.
Примеры
Пример #1 cubrid_result() example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT * FROM code");
$result = cubrid_result($req, 0);
var_dump($result);
$result = cubrid_result($req, 0, 1);
var_dump($result);
$result = cubrid_result($req, 5, "f_name");
var_dump($result);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>
Результат выполнения данного примера:
string(1) "X" string(5) "Mixed" string(4) "Gold"
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- CUBRID
- cubrid_affected_rows
- cubrid_client_encoding
- cubrid_close
- cubrid_data_seek
- cubrid_db_name
- cubrid_errno
- cubrid_error
- cubrid_fetch_array
- cubrid_fetch_assoc
- cubrid_fetch_field
- cubrid_fetch_lengths
- cubrid_fetch_object
- cubrid_fetch_row
- cubrid_field_flags
- cubrid_field_len
- cubrid_field_name
- cubrid_field_seek
- cubrid_field_table
- cubrid_field_type
- cubrid_list_dbs
- cubrid_num_fields
- cubrid_ping
- cubrid_query
- cubrid_real_escape_string
- cubrid_result
- cubrid_unbuffered_query
Коментарии
404 Not Found