TABLE A
id=1
+file_id=100
|
| TABLE B
|id=1
+file_id=100
|
|TABLE FILES
>id=100
file_name = picture.jpg
file_size = 99999
file_id of TABLE A and TABLE B are in connection width TABLE FILES id.
I would like to check if any of the two table records are pointed to the file with let sey id=100. If not the file would be deleted.
How can I do this?
Delete the results of the query:
This (ideally) gets the files which are not referenced in either A or B