Документация PHP


fbsql_fetch_assoc

fbsql_fetch_lengths

FrontBase Функции

PHP Manual


fbsql_fetch_field

(PHP 4 >= 4.0.6, PHP 5)

fbsql_fetch_field — Get column information from a result and return as an object

Описание

object fbsql_fetch_field ( resource $result [, int $field_offset ] )

Used in order to obtain information about fields in a certain query result.

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

result

A result identifier returned by fbsql_query() or fbsql_db_query().

field_offset

The numerical offset of the field. The field index starts at 0. If not specified, the next field that wasn't yet retrieved by fbsql_fetch_field() is retrieved.

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

Returns an object containing field information, or FALSE on errors.

The properties of the object are:

  • name - column name
  • table - name of the table the column belongs to
  • max_length - maximum length of the column
  • not_null - 1 if the column cannot be NULL
  • type - the type of the column

Примеры

Пример #1 fbsql_fetch_field() example

<?php
fbsql_connect
($host$user$password)
    or die(
"Could not connect");
$result fbsql_db_query("database""select * from table")
    or die(
"Query failed");
# get column metadata
$i 0;
while (
$i fbsql_num_fields($result)) {
    echo 
"Information for column $i:<br />\n";
    
$meta fbsql_fetch_field($result);
    if (!
$meta) {
        echo 
"No information available<br />\n";
    }
    echo 
"<pre>
max_length:   $meta->max_length
name:         $meta->name
not_null:     $meta->not_null
table:        $meta->table
type:         $meta->type
</pre>"
;
    
$i++;
}
fbsql_free_result($result);
?>

Смотрите также


fbsql_fetch_assoc

fbsql_fetch_lengths

FrontBase Функции

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…