Jump to content

save byte into blob


csckid

Recommended Posts

Java Code

final byte[] r=record;
byte[] data = ("name=" + "myname"+ "&blob=" + r).getBytes();      
out.write(data);	

PHP code

<?php
require("phpfunc.fns");
sqlconnect();

$name = trim($_POST["name"]);

$blob =($_POST["blob"]);

$sql="insert into myblob values('".$name."',".$blob.")";

mysql_query( $sql);

?>

 

 

$blob is in byte[] format. I need to save this into mysql blob datatype

Link to comment
https://forums.phpfreaks.com/topic/206421-save-byte-into-blob/#findComment-1079863
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.