db2_num_fields

(PECL ibm_db2 >= 1.0.0)

db2_num_fields Returns the number of fields contained in a result set

Beschreibung

db2_num_fields(resource $stmt): int|false

Returns the number of fields contained in a result set. This is most useful for handling the result sets returned by dynamically generated queries, or for result sets returned by stored procedures, where your application cannot otherwise know how to retrieve and use the results.

Parameter-Liste

stmt

A valid statement resource containing a result set.

Rückgabewerte

Returns an integer value representing the number of fields in the result set associated with the specified statement resource. Returns false if the statement resource is not a valid input value.

Beispiele

Beispiel #1 Retrieving the number of fields in a result set

The following example demonstrates how to retrieve the number of fields returned in a result set.

<?php

$sql 
"SELECT id, name, breed, weight FROM animals ORDER BY breed";
$stmt db2_prepare($conn$sql);
db2_execute($stmt$sql);
$columns db2_num_fields($stmt);

echo 
"There are {$columns} columns in the result set.";
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

There are 4 columns in the result set.

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

socolive

Socolive (https://socolivetv.us.org/) là điểm đến quen thuộc dành cho cộng đồng yêu bóng đá trực tuyến với trải nghiệ ...

Geschrieben von socolivetvusorgs am 26.05.2026 19:24:07
Forum: Off-Topic Diskussionen
Mitstreiter gesucht: On-Premise AI Analyzer (Symfony 8 + Ollama)

Hi zusammen, ich arbeite aktuell an einem Open-Source-Projekt und suche Gleichgesinnte aus der PHP- und AI-Welt, die Lust haben, unabhängig und ...

Geschrieben von schrobak am 26.05.2026 17:48:54
Forum: Jobangebote
Review of smartphone apps from the best bookmakers in India

I am glad to welcome, as I have probably already guessed Ravindran and today I will tell you about some nuances that you need to know if you are p ...

Geschrieben von ravindrankhx am 26.05.2026 12:14:32
Forum: Apps und PHP Script Gesuche
SELLING BEST FRESH CC CCC CVV CVV2 DUMPS12 2026 FULLSsn CS Dob DL ALL

contact me via>> Gmail : dumpss500@gmail.com telegram:@king_dumps12 My store=>> https://dumps201.net/login.php ------------------ Hello All Cus ...

Geschrieben von sellergood11 am 26.05.2026 05:23:09
Forum: Archiv / Trash