K
K
khodos_dmitry2018-02-26 16:22:52
PHP
khodos_dmitry, 2018-02-26 16:22:52

How to save image to mysql database?

I use mysqli_real_escape_string, but it gives an error:
Incorrect string value: '\xFF\xD8\xFF\xE0\x00\x10...' for column 'html' at row 1# Finishing ...
I understand that pictures do not need to be saved to the database . I just want to know.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Arushanov, 2018-02-26
@khodos_dmitry

What is the format of the field in your database?
You need a field of type TINYBLOB, BLOB, MEDIUMBLOB, LONGBLOB (differences in storage volume)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question