Stephan: Blob Handling in MySQL: Thumbnails erstellen

Beitrag lesen

So jetzt nochmal:

Ich habs jetzt folgendermaßen gemacht:

ob_start();
imagejpeg($img);
$stream = ob_get_contents();
ob_end_clean();
$stream = addslashes($stream);

$insert_qry = "insert into $db.tbl_blob_thumbnails (blobid, blob) values(" . $blob["BlobID"] . ", '$stream')";
...

Gibt mir dann den Output:

Abfrage war ungültig
insert into usr_web6_1.tbl_blob_thumbnails (blobid, blob) values(150, '[... Binaer-Inhalt ...]')

Fällt euch daran spontan irgendwas auf, was so nicht klappen kann?

Gruß
Stephan