odbc_primarykeys

(PHP 4, PHP 5, PHP 7, PHP 8)

odbc_primarykeysGets the primary keys for a table

Beschreibung

odbc_primarykeys(
    resource $odbc,
    ?string $catalog,
    string $schema,
    string $table
): resource|false

Returns a result identifier that can be used to fetch the column names that comprise the primary key for a table.

Parameter-Liste

odbc

Eine ODBC-Verbindungsressource, siehe odbc_connect() für Details.

catalog

Der Katalog ('Kennzeichner' in ODBC 2 Terminologie).

schema

Das Schema ('Besitzer' in ODBC 2 Terminologie).

table

Rückgabewerte

Returns an ODBC result identifierBei einem Fehler wird false zurückgegeben..

The result set has the following columns:

  • TABLE_CAT
  • TABLE_SCHEM
  • TABLE_NAME
  • COLUMN_NAME
  • KEY_SEQ
  • PK_NAME
Treiber können zusätzliche Spalten melden.

The result set is ordered by TABLE_CAT, TABLE_SCHEM, TABLE_NAME and KEY_SEQ.

Beispiele

Beispiel #1 List primary Keys of a Column

<?php
$conn 
odbc_connect($dsn$user$pass);
$primarykeys odbc_primarykeys($conn'TutorialDB''dbo''TEST');
while ((
$row odbc_fetch_array($primarykeys))) {
    
print_r($row);
    break; 
// further rows omitted for brevity
}
?>

Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie:

Array
(
    [TABLE_CAT] => TutorialDB
    [TABLE_SCHEM] => dbo
    [TABLE_NAME] => TEST
    [COLUMN_NAME] => id
    [KEY_SEQ] => 1
    [PK_NAME] => PK__TEST__3213E83FE141F843
)

Siehe auch

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Was genau bedeutet "Vibe Coding"? Ein tiefgehender Blick für Entwickler

In der Welt der Softwareentwicklung gibt es unzählige Wege, wie man an ein Projekt herangeht. Manche schwören auf strikte Planung, andere auf bewährte Algorithmen und wieder andere lassen sich von etwas ganz anderem leiten: ihrem Gefühl. ...

admin

Autor : admin
Kategorie: Software & Web-Development

PHP cURL-Tutorial: Verwendung von cURL zum Durchführen von HTTP-Anfragen

cURL ist eine leistungsstarke PHP-Erweiterung, die es Ihnen ermöglicht, mit verschiedenen Servern über verschiedene Protokolle wie HTTP, HTTPS, FTP und mehr zu kommunizieren. ...

TheMax

Autor : TheMax
Kategorie: PHP-Tutorials

Midjourney Tutorial - Anleitung für Anfänger

Über Midjourney, dem Tool zur Erstellung digitaler Bilder mithilfe von künstlicher Intelligenz, gibt es ein informatives Video mit dem Titel "Midjourney Tutorial auf Deutsch - Anleitung für Anfänger" ...

Mike94

Autor : Mike94
Kategorie: KI Tutorials

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Malaysia tour package

Recovering from heavy marathon training sessions was taking twice as long as it used to last year. Pushing through the constant joint aches was de ...

Geschrieben von jeromeda am 22.05.2026 22:19:40
Forum: Off-Topic Diskussionen
Sell Cvv,DEAD Dumps Pin,CashApp Transfer,Clone Card,Fullz info ssn dob cs dl USA UK

Hi every customer,I have shop CVV, CC and site tool shop and other stuff. - I'm a big hacker ===> Welcome all of you to my service. ===> I have my ...

Geschrieben von sellergood11 am 22.05.2026 09:53:53
Forum: Windows (Client/Server)
Sell cvv US-UK-AUS-CA-EU-ASIA-dump12 2026 FULL Ssn CS Dob DL fresh all country

Selling 100% Good Cards Ccv,Fullz,dumps+pin,Bank Logs,Wu trF ==== My adress : SHop Online Auto Sell : Best Seller sell only cvv country : USA CAN ...

Geschrieben von sellergood11 am 22.05.2026 09:52:36
Forum: Entwicklungsumgebungen
Verified ssndob dl fullz-dl photos-w2 form tax return-fafsa-passports

=====> WELCOME TO MY BUSINESS > Gmail : dumpss500@gmail.com telegram:@king_dumps12 My store=>> https://dumps201.net/login.php CREDIT CARD US ...

Geschrieben von sellergood11 am 22.05.2026 09:50:47
Forum: Existenzgründer, Freelancing, Verträge und sonstiges