1

I was looking for an example how to store a large text array ( javascript ) into my mySQL Database as BLOB.

I don´t know which solution works:

  1. Javascript array will be send via Ajax JSON then processed via the PHP File. Convert JSON -> BLOB and save into mySQL Database. Fetching BLOB convert to JSON send to javascript variable.

  2. Create a BLOB with arraydata and send a BLOB file via Ajax ( possible? ) and store it in the database. Fetching Blob via Ajax converting it in javascript back to an array.

It would really help me if somehow has some tutorials regarding this question. I have seen some rough examples for saving images (MIME: Type PNG etc) but not MIME: Type Text.

Thank you !

1 Answer 1

-1

Already solved it. Question closed.

I just base64_encoded and base64_decoded the variable as usual. You just had to assure that in the my.ini (mySQL) max_packet size was set larger than 1MB in order to save the file, that was the reason it was not working.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.