MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES
*result, unsigned int fieldnr)
Описание
По заданному номеру поля
fieldnr для столбца внутри
результирующего набора
возвращает определение данного
поля столбца как структуру
MYSQL_FIELD. Эту функцию
можно использовать для
извлечения определения для
произвольного столбца. Величина
fieldnr должна находиться
в диапазоне от 0 до
mysql_num_fields(result)-1.
Возвращаемые значения
Структура MYSQL_FIELD для
указанного столбца.
Ошибки
Нет.
Пример
unsigned int num_fields;
unsigned int i;
MYSQL_FIELD *field;
num_fields = mysql_num_fields(result);
for(i = 0; i < num_fields; i++)
{
field = mysql_fetch_field_direct(result, i);
printf("Field %u is %s\n", i, field->name);
}
This is a translation of the MySQL Reference Manual that can be found at dev.mysql.com. The original Reference Manual is in English, and this translation is not necessarily as up to date as the English version.
© 1995-2005 MySQL AB. All rights reserved.
