Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

PHP and MySQL blobs

Name: Anonymous 2007-08-23 14:19 ID:iDy72R64

hey /prog/, I'm trying to update a mysql table, here is the column that is giving me issues:

document_content - mediumblob


How can I take a plain ol' string from PHP and update this column with a string? The column keeps updating to 0 and Google hasn't been much help.



Name: Anonymous 2007-08-23 18:10 ID:zgbfHWd0

$string  = "<enterpriseXMLtoSaveAsBlob>";
$string .= "somestuff";
$string .= "</enterpriseXMLtoSaveAsBlob>";

$query  = "UPDATE stupidTable SET ";
$query .= "document_content = '{$string}' ";
$query .= "WHERE id = '{$id}'";

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List