update : 2015.11.03
php.shukuma.com검색:
|
PDO::cubrid_schema(No version information available, might only be in Git) PDO::cubrid_schema — Get the requested schema information 설명
public 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 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 예제
Example #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 ) ) |