|
MySQL.RU - Webboard
Вернуться
Вопрос о UNIQUE ... (Andrei) 22/09/2002 - 13:13:14
Re: Вопрос о UNIQUE ... (stalker) 23/09/2002 - 11:59:37
Re: Вопрос о UNIQUE ... (vi.k) 24/09/2002 - 08:09:39
Re: Вопрос о UNIQUE ... (Фдуч) 24/09/2002 - 11:54:58
> Original message text:
> From: Andrei - 22/09/2002 - 13:13:14
> Subject:Вопрос о UNIQUE ...
> -----------------
> Знающие люди подскажите пожалуйста, как из php скрипта можно узнать имеет ли поле атрибут UNIQUE?
> Если да то как?
>
>
From: Фдуч - 24/09/2002 - 11:54:58
Subject:Вопрос о UNIQUE ...
-----------------
Читай маны, Andrei...
mysql_fetch_field
(PHP 3, PHP 4 >= 4.0.0)
mysql_fetch_field -- Get column information from a result and return as an object
Description
object mysql_fetch_field ( resource result [, int field_offset])
Returns an object containing field information.
mysql_fetch_field() can be used in order to obtain information about fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by mysql_fetch_field() is retrieved.
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
primary_key - 1 if the column is a primary key
unique_key - 1 if the column is a unique key
multiple_key - 1 if the column is a non-unique key
numeric - 1 if the column is numeric
blob - 1 if the column is a BLOB
type - the type of the column
unsigned - 1 if the column is unsigned
zerofill - 1 if the column is zero-filled
[Это сообщение - спам!]
Последние сообщения из форума
Уважаемые посетители форума MySQL.RU!
Убедительная просьба, прежде чем задавать свой вопрос в этом форуме, обратите внимание на разделы:
- ответы на наиболее часто задаваемые вопросы - FAQ
- раздел документация
- раздел поиск по сообщениям форума и документации
Также, старайтесь наиболее подробно указывать свою ситуацию (версию операционной системы, версию MySQL,
версию программного обеспечения, по которому возникает вопрос, текст возникающих ошибок, и др.)
Помните, чем конкретнее Вы опишете ситуацию, тем больше шансов получить реальную помощь.
4777
|
|