cubrid_lob2_read

(PECL CUBRID >= 8.4.1)

cubrid_lob2_readRead from BLOB/CLOB data

Beschreibung

cubrid_lob2_read(resource $lob_identifier, int $len): string

The cubrid_lob2_read() function reads len bytes from the LOB data and returns the bytes read.

Parameter-Liste

lob_identifier

Lob identifier as a result of cubrid_lob2_new() or get from the result set.

len

Length from buffer you want to read from the lob data.

Rückgabewerte

Returns the contents as a string, false when there is no more data, or null on failure.

Beispiele

Beispiel #1 cubrid_lob2_read() example 1

<?php
// test_lob (id INT, contents CLOB)

$conn cubrid_connect("localhost"33000"demodb""public""");

$req cubrid_execute($conn"select * from test_lob");

$row cubrid_fetch_row($reqCUBRID_LOB);

print 
"position now is " cubrid_lob2_tell($row[1]) . "\n";

cubrid_lob2_seek($row[1], 10CUBRID_CURSOR_FIRST);

print 
"\nposition after moving farword is " cubrid_lob2_tell($row[1]) . "\n";

$data cubrid_lob2_read($row[1], 12);

print 
"\nposition after reading is " cubrid_lob2_tell($row[1]) . "\n";

print 
$data "\n";

cubrid_lob2_seek($row[1], 5CUBRID_CURSOR_CURRENT);

print 
"\nposition after moving again is " cubrid_lob2_tell($row[1]) . "\n";

$data cubrid_lob2_read($row[1], 20);
print 
$data "\n";

cubrid_disconnect($conn);
?>

Beispiel #2 cubrid_lob2_read() example 2

<?php
// test_lob (id INT, contents CLOB)

$conn cubrid_connect("localhost"33000"demodb""dba""");

$req cubrid_execute($conn"select * from test_lob");

$row cubrid_fetch_row($reqCUBRID_LOB);

while (
true) {
    if (
$data cubrid_lob2_read($row[1], 1024)) {
        print 
$data "\n";
    }
    elseif (
$data === false) {
        print 
"There is no more data\n";
        break;
    }
    else {
        print 
"There must some errors\n";
        break;
    }
}

cubrid_disconnect($conn);
?>

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

IGGM: WoW TBC Classic Falls Short of Player Expectations

Hy Guys, Yeah, I get why people feel that way about WoW TBC Classic. A lot of players were expecting that original immersive grind and community v ...

Geschrieben von johny83 am 18.04.2026 09:15:48
Forum: Off-Topic Diskussionen
Fehler bei Beziehung

This really requires experience and a solid understanding of source code development. Updates and knowledge sharing make learning significantly mo ...

Geschrieben von sikasema am 18.04.2026 05:59:27
Forum: PHP Developer Forum
Diablo 4 Season 12 Items Massacre Sale! Rush to D4Gold.com!

Diablo IV Season 12: Season of Slaughter is in full swing, and every player in Sanctuary is racing to stay ahead of the meta, unlock high-end gear ...

Geschrieben von salisy am 18.04.2026 04:34:44
Forum: User stellen sich vor
Where to buy The Best POE Patch 3.28 & POE 2 Currency?

POE 3.28 Mirage League has been live for quite some time, and the community’s focus is no longer on new updates—instead, players are talking m ...

Geschrieben von salisy am 18.04.2026 04:25:14
Forum: User stellen sich vor