How to insert image binary from xml data to mysql in PHP?
I have some photos (not big, only 8kb) in mysql database (in my desktop). the field type is blob. i want to export the table to xml file then upload it to my database website. but it not success. Here is what i have done : Exporting the data to xml (in my computer desktop):
Code:
FileStream fs = new FileStream(filename,FileMode.Create,FileAccess.Write,FileShare.None);
StreamWriter sw = new StreamWriter(fs,Encoding.ASCII);
ds.WriteXml(sw);
Why exporting MySQL blob to XML then importing it back doesn't get the same result?
I have some photos (not big, only 8kb) in mysql database (in my desktop). the field type is blob. actually i want to export the table to xml file then upload it to my database website. but it failed. I try to mimic it by exporting the table to xml file then importing it back to another table (the table's structure is same). I can do it but i don't get the same photos (only some encoding text). Here is some pieces of code: