How to write the js script in the database?

There is a script format script... tipical js script.../script
As it is better to write to the database (using PHP), and then remove it from there that the code was not broken?
The field type "longtext".
Used serialize(). In the derivation code to the database unserialize. But the code returns with escaped quotes.
June 10th 19 at 14:28
1 answer
June 10th 19 at 14:30
No way to escape and not be serialized. Simply insert and pull out as is, with the help https://www.w3schools.com/PhP/php_mysql_prepared_s...
php.net/manual/ru/mysqli.quickstart.prepared-state...

Find more questions by tags DatabasesPHP