Import images to a row based on image name

I am looking for a way to upload/import images into my database, this I can do, however what I am looking to do is upload/import images that have a filename that matches the inventory # it will automatically import into that row, for example images name 1001-1.jpg, 1001-2.jpg would import into the inventory # 1001 row and images with the name of 4022-1.jpg, 4022-2.jpg would import into the inventory # 4022 row.

hopefully someone can point me in the right direction on how to keep this.

thanks in advance

Some sort of pseudo-code:

// upload image
// strip out image filename after the first "-" to leave only the first section
// check if you have an inventory item with the same code
// if you do, add image to it

Also, normalize your data and use a join table for this instead of stuffing it all into a row of a single table.

Thank you starlion makes sense

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.