| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2007-01-29 20:35 UTC] tony2001@php.net
  [2007-02-06 01:00 UTC] php-bugs at lists dot php dot net
  | 
    |||||||||||||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 04:00:01 2025 UTC | 
Description: ------------ Data stored in MySQL 4.1 database as LONGBLOB object is fetched badly when prepared statement mechanism is used. Binded result is likely a heap of internal PHP data. Reproduce code: --------------- MySQL: CREATE TABLE Upload ( ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, Content LONGBLOB NOT NULL, PRIMARY KEY (ID) ) Type=InnoDB CHARACTER SET 'latin1'; PHP: - store some content (e.g. file) to table Upload - fetch stored content via prepared statement: ... $stmt = $conn->prepare('select Content from Upload where ID=?'); $stmt->bind_param('i',$id); $stmt->execute(); $stmt->bind_result($Content1); $stmt->fetch(); $stmt->close(); ... - compare stored and fetched content Expected result: ---------------- Stored content. Actual result: -------------- Heap of internal PHP data.