Thursday, October 25, 2007

inserting blob data to mysql(Images,mp3....)using php

fileHandle = fopen($fileUpload, "r");

$fileContent = fread($fileHandle, $fileUpload_size);

$fileContent = addslashes($fileContent);
$dbQuery = "INSERT INTO myBlobs VALUES (0, '$strDesc', '$fileContent', '$fileUpload_type')";



mysql_query($dbQuery);



Powered by ScribeFire.

No comments:

Post a Comment