MySQL Question

phpmyadmin deletes backslash and hyphen, but I don't want

I want to store some data on my phpmyadmin database. But phpmyadmin delete backslashes and hyphens in my link or text. How can i fix it ? I am using utf8_general_ci in tables.

For example this is the link I want to record\6\7\8\5\8\5\3\2\0e221cda-8822-4459-be59-0b8047227e2c.jpg

And here is result

In this example, phpmyadmin delete backslashes after "..image=Images".
And here, delete a zero before "e221cda..."

Also, I want to store an id number like this "21865-3536", but phpmyadmin convert this number to "21865". Why is this happening ?

Answer Source

This has nothing to do with phpMyAdmin per se but with MySQL's defaulting to considering backslashes as the escaping character.

Two solutions: either,

  1. escape the backslashes in all your input (i.e. change them to \\)


  1. temporary change the SQL mode with :


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download