Hi,
I have an HTML file which i would want to insert into a table as a single row.
I am currently using LOAD DATA LOCAL INFILE ‘/var/lib/tomcat7/webapps/app/index.html’ INTO TABLE html_sample
but it is storing each as individual row in the table.
Is there anyway to store the entire html file as a single row?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello there,
I recently had to do the same thing. What I did was to incode the HTML into base64. I think it’s the safest scenario. There might be other solutions but I think this might be the cleanest approach:
String originalInput = "test input";
String encodedString = Base64.getEncoder().encodeToString(originalInput.getBytes());
/* insert to database */
I hope that this helps you the same way it helped me!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.