Sample of php accessing MySQL (MariaDB) database, with images stored IN THE DATABASE as Binary Large OBjects (BLOBs)
Database ER Diagram is below. Image thumbnails are 0.8% of original size; you can download full resolution by right-clicking/long tapping (depending on your device) the thumbnail and choosing "save as" or similar.
The List Type can be anything but the query shows only "Shopping" list types.
SELECT item.list_name , item.item_name ,item_image , is_deleted , list.list_type FROM list ,item where item.list_name=list.list_name and list.list_type='Shopping' order by 1,2
| List Name | List Type | Item Name | Logically Deleted | Item Image |
|---|---|---|---|---|
| Fry's | Shopping | Bread | 0 | |
| Home Depot | Shopping | Extension Cord | 1 | |
| Home Depot | Shopping | Flowers | 1 | |
| Safeway | Shopping | Light Bulb | 0 |
select list.list_name ,list_type ,item_name ,is_deleted ,item_image from list left outer join item on item.list_name=list.list_name and list.list_type='Shopping' order by 1,2
| List Name | List Type | Item Name | Logically Deleted | Item Image |
|---|---|---|---|---|
| Amazon | Shopping | |||
| Fry's | Shopping | Bread | 0 | |
| Home Depot | Shopping | Extension Cord | 1 | |
| Home Depot | Shopping | Flowers | 1 | |
| Photos | Private | |||
| Safeway | Shopping | Light Bulb | 0 |