I have a simple MySQL query that takes an html string and inserts this into a database however I always lose the line breaks – do I need to do something for it to retain the line breaks in the insert query?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Load the strings back in with a query, they see if they contain line breaks. It may also be a good idea to check for ascii 13, 10, and a combination of both. If it’s going in with a linefeed character (10), it’s possible that MySQL is expecting a carriage return/linefeed combination, or vice versa.