PHP » GoLang |
login |
register |
about
|
cubrid_schema(PECL CUBRID >= 8.3.0) cubrid_schema — Get the requested schema information Description
array cubrid_schema
( resource
$conn_identifier
, int $schema_type
[, string $class_name
[, string $attr_name
]] )
The cubrid_schema() function is used to get the
requested schema information from database. You have to designate
The result of the cubrid_schema 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.
Parameters
Return ValuesArray containing the schema information, when process is successful;
Changelog
ExamplesExample #1 cubrid_schema() example
<?php The above example will output: --- Primary Key --- array(3) { [0]=> array(4) { ["CLASS_NAME"]=> string(4) "game" ["ATTR_NAME"]=> string(12) "athlete_code" ["KEY_SEQ"]=> string(1) "3" ["KEY_NAME"]=> string(41) "pk_game_host_year_event_code_athlete_code" } [1]=> array(4) { ["CLASS_NAME"]=> string(4) "game" ["ATTR_NAME"]=> string(10) "event_code" ["KEY_SEQ"]=> string(1) "2" ["KEY_NAME"]=> string(41) "pk_game_host_year_event_code_athlete_code" } [2]=> array(4) { ["CLASS_NAME"]=> string(4) "game" ["ATTR_NAME"]=> string(9) "host_year" ["KEY_SEQ"]=> string(1) "1" ["KEY_NAME"]=> string(41) "pk_game_host_year_event_code_athlete_code" } } --- Foreign Keys --- array(2) { [0]=> array(9) { ["PKTABLE_NAME"]=> string(7) "athlete" ["PKCOLUMN_NAME"]=> string(4) "code" ["FKTABLE_NAME"]=> string(4) "game" ["FKCOLUMN_NAME"]=> string(12) "athlete_code" ["KEY_SEQ"]=> string(1) "1" ["UPDATE_RULE"]=> string(1) "1" ["DELETE_RULE"]=> string(1) "1" ["FK_NAME"]=> string(20) "fk_game_athlete_code" ["PK_NAME"]=> string(15) "pk_athlete_code" } [1]=> array(9) { ["PKTABLE_NAME"]=> string(5) "event" ["PKCOLUMN_NAME"]=> string(4) "code" ["FKTABLE_NAME"]=> string(4) "game" ["FKCOLUMN_NAME"]=> string(10) "event_code" ["KEY_SEQ"]=> string(1) "1" ["UPDATE_RULE"]=> string(1) "1" ["DELETE_RULE"]=> string(1) "1" ["FK_NAME"]=> string(18) "fk_game_event_code" ["PK_NAME"]=> string(13) "pk_event_code" } } --- Column Attribute --- array(1) { [0]=> array(13) { ["ATTR_NAME"]=> string(4) "area" ["DOMAIN"]=> string(1) "7" ["SCALE"]=> string(1) "2" ["PRECISION"]=> string(2) "10" ["INDEXED"]=> string(1) "0" ["NON_NULL"]=> string(1) "0" ["SHARED"]=> string(1) "0" ["UNIQUE"]=> string(1) "0" ["DEFAULT"]=> NULL ["ATTR_ORDER"]=> string(1) "4" ["CLASS_NAME"]=> string(7) "stadium" ["SOURCE_CLASS"]=> string(7) "stadium" ["IS_KEY"]=> string(1) "0" } } |
more
Recently updated
more
Most requested
more
Last requests
|