Keine Cache-Version


Caching deaktiviert Standardeinstellung für diese Seite:aktiviert (code LNG204)
Wenn die Anzeige zu langsam ist, können Sie den Benutzermodus deaktivieren, um die zwischengespeicherte Version anzuzeigen.

Rechercher une fonction PHP

PDO::cubrid_schema

(No version information available, might only be in Git)

PDO::cubrid_schemaGet the requested schema information

Beschreibung

public PDO::cubrid_schema ( int $schema_type [, string $table_name [, string $col_name ]] ) : array

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.

Result Composition of Each Type
Schema Column Number Column Name Value
PDO::CUBRID_SCH_TABLE 1 NAME  
  2 TYPE 0:system table 1:view 2:table
PDO::CUBRID_SCH_VIEW 1 NAME  
  2 TYPE 1:view
PDO::CUBRID_SCH_QUERY_SPEC 1 QUERY_SPEC  
PDO::CUBRID_SCH_ATTRIBUTE / PDO::CUBRID_SCH_TABLE_ATTRIBUTE 1 ATTR_NAME  
  2 DOMAIN  
  3 SCALE  
  4 PRECISION  
  5 INDEXED 1:indexed
  6 NOT NULL 1:not null
  7 SHARED 1:shared
  8 UNIQUE 1:unique
  9 DEFAULT  
  10 ATTR_ORDER base:1
  11 CLASS_NAME  
  12 SOURCE_CLASS  
  13 IS_KEY 1:key
PDO::CUBRID_SCH_METHOD / PDO::CUBRID_SCH_TABLE_METHOD 1 NAME  
  2 RET_DOMAIN  
  3 ARG_DOMAIN  
PDO::CUBRID_SCH_METHOD_FILE 1 METHOD_FILE  
PDO::CUBRID_SCH_SUPER_TABLE / PDO::CUBRID_SCH_DIRECT_SUPER_TABLE / PDO::CUBRID_SCH_SUB_TABLE 1 CLASS_NAME  
  2 TYPE 0:system table 1:view 2:table
PDO::CUBRID_SCH_CONSTRAINT 1 TYPE 0:unique 1:index 2:reverse unique 3:reverse index
  2 NAME  
  3 ATTR_NAME  
  4 NUM_PAGES  
  5 NUM_KEYS  
  6 PRIMARY_KEY 1:primary key
  7 KEY_ORDER base:1
PDO::CUBRID_SCH_TRIGGER 1 NAME  
  2 STATUS  
  3 EVENT  
  4 TARGET_CLASS  
  5 TARGET_ATTR  
  6 ACTION_TIME  
  7 ACTION  
  8 PRIORITY  
  9 CONDITION_TIME  
  10 CONDITION  
PDO::CUBRID_SCH_TABLE_PRIVILEGE / PDO::CUBRID_SCH_COL_PRIVILEGE 1 CLASS_NAME / ATTR_NAME  
  2 PRIVILEGE  
  3 GRANTABLE  
PDO::CUBRID_SCH_PRIMARY_KEY 1 CLASS_NAME  
  2 ATTR_NAME  
  3 KEY_SEQ base:1
  4 KEY_NAME  
PDO::CUBRID_SCH_IMPORTED_KEYS / PDO::CUBRID_SCH_EXPORTED_KEYS / PDO::CUBRID_SCH_CROSS_REFERENCE 1 PKTABLE_NAME  
  2 PKCOLUMN_NAME  
  3 FKTABLE_NAME base:1
  4 FKCOLUMN_NAME  
  5 KEY_SEQ base:1
  6 UPDATE_ACTION 0:cascade 1:restrict 2:no action 3:set null
  7 DELETE_ACTION 0:cascade 1:restrict 2:no action 3:set null
  8 FK_NAME  
  9 PK_NAME  

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Parameter-Liste

schema_type

Schema type that you want to know.

table_name

Table you want to know the schema of.

col_name

Column you want to know the schema of.

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Rückgabewerte

Array containing the schema information, when process is successful;

FALSE, when process is unsuccessful

Erste Seite von PHP-Handbuch Inhaltsverzeichnis Haut

Beispiele

Beispiel #1 A PDO::cubrid_schema() example

This example shows how to get primary key and foreign keys of table game.

<?php
$pk_list 
$dbh->cubrid_schema(PDO::CUBRID_SCH_PRIMARY_KEY"game");
print_r($pk_list);

$fk_list $dbh->cubrid_schema(PDO::CUBRID_SCH_IMPORTED_KEYS"game");
print_r($fk_list);
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

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
        )

)

Finde eine PHP-Funktion

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 30/01/2003, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/php-rf-pdo.cubrid-schema.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:fr Manuel PHP : http://php.net

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut