In file: admin.vehiclemanager.php
there is the query:
$database->setQuery("DELETE FROM #__vehiclemanager_photos WHERE location='$del_photo'"
;
I look into the DB and the table actually does not contains the "location" column.
now, I've modified the query to best fit the table:
$del_photo_thumb = $del_photo_name."_mini".$del_photo_type;
$del_photo_full = $del_photo_name.$del_photo_type;
$database->setQuery("DELETE FROM #__vehiclemanager_photos WHERE thumbnail_img='$del_photo_thumb' AND main_img='$del_photo_full' AND fk_vehicleid IN (SELECT id FROM #__vehiclemanager_vehicles WHERE vehicleid=$numId)"
;
However, there is still an error in my query, as if you insert for a vehicle more than once the same photo... it will not work properly, it will remove all references to the photo and not only that you select from admin back end.
I'm now working on it, but I have no time in these days.
I hope this will be helpful.