如何使用php将图片添加到blob字段中

I have an SQL DB that comes with a BLOB field that needs to be fill with pictures. The pictures are in a folder.

How can I use PHP to import the pictures into the blob field automatically if the pictures have the name of the ID field?

edit:
I am not creating the database, just filling it.
The program which is using the database is a merchandise management system, which only allows to store a blob.
That way I have to get the pictures into the SQL and cannot only store the filepath.
Database is DBISAM.
So far I tried to to store the pictures using SQL commands, but cannot see how it would work, so that I hoped someone could help me solving this using PHP.

Best Kurt

I'm not sure if this is helpful, but can I assume that the point of storing the pictures within a BLOB field is simply to associate the image with a specific record in the database? If this is the case, it might be more appropriate to simply reference the filepath of the appropriate image in the DB, rather than trying to store the actual file within the DB. This is more common practice than storing actual resources in the DB, which would take up way too much space for an application of any size.

For example, if you're creating a "users" table and you want to associate a profile picture with an individual user, rather than trying to store a raw .jpg inside the database, instead store /path/to/image/from/webroot.jpg in a field called something like "profile_pic_path" for each user. Then you can reference this path whenever you want to use the image.

You can use

$data = file_get_contents($_FILES['photo']['tmp_name']);

to get your imagedata into a variable (assuming that the file is uploaded and its form element is called 'photo', otherwise change the path). The content of this variable can be stored within a blob field of your database.