PDO::cubrid_schema(Информация о версии неизвестна, возможно, только в SVN) PDO::cubrid_schema — Get the requested schema information Описание
array PDO::cubrid_schema
( int $schema_type
[, string $table_name
[, string $col_name
]] )
This function is used to get the requested schema information from database. You have to designate table_name, if you want to get information on certain table, col_name, if you want to get information on certain column (can be used only with PDO::CUBRID_SCH_COL_PRIVILEGE). The result of this function is returned as a two-dimensional array (column (associative array) * row (numeric array)). The following tables shows types of schema and the column structure of the result array to be returned based on the schema type.
Список параметров
Возвращаемые значенияArray containing the schema information, when process is successful; FALSE, when process is unsuccessful Примеры
Пример #1 A PDO::cubrid_schema() example This example shows how to get primary key and foreign keys of table game.
<?phpРезультат выполнения данного примера:
Result:
Array
(
[0] => Array
(
[CLASS_NAME] => game
[ATTR_NAME] => athlete_code
[KEY_SEQ] => 3
[KEY_NAME] => pk_game_host_year_event_code_athlete_code
)
[1] => Array
(
[CLASS_NAME] => game
[ATTR_NAME] => event_code
[KEY_SEQ] => 2
[KEY_NAME] => pk_game_host_year_event_code_athlete_code
)
[2] => Array
(
[CLASS_NAME] => game
[ATTR_NAME] => host_year
[KEY_SEQ] => 1
[KEY_NAME] => pk_game_host_year_event_code_athlete_code
)
)
Array
(
[0] => Array
(
[PKTABLE_NAME] => athlete
[PKCOLUMN_NAME] => code
[FKTABLE_NAME] => game
[FKCOLUMN_NAME] => athlete_code
[KEY_SEQ] => 1
[UPDATE_RULE] => 1
[DELETE_RULE] => 1
[FK_NAME] => fk_game_athlete_code
[PK_NAME] => pk_athlete_code
)
[1] => Array
(
[PKTABLE_NAME] => event
[PKCOLUMN_NAME] => code
[FKTABLE_NAME] => game
[FKCOLUMN_NAME] => event_code
[KEY_SEQ] => 1
[UPDATE_RULE] => 1
[DELETE_RULE] => 1
[FK_NAME] => fk_game_event_code
[PK_NAME] => pk_event_code
)
)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||