I have three tables (ngo, staff and finance). I want to delete all staffs and finance data of a particular ngo if that ngo data is deleted. Now, I am adding data in those tables separately: first, add all ngos; second, add all staffs of the ngo; third, add all finance of the ngo.
Now, let's say I only add ngo and staff and later change my mind to delete the information from the two tables without going further to add finance.
$qry =mysqli_query($mysqli, "
    update ngo, finance, staff 
    set ngo.deletestatus=('delete'), 
        finance.deletestatus=('delete'),
        staff.deletestatus=('delete')
    where ngo.ngo_id=finance.ngo_id
        and ngo.ngo_id=staff.ngo_id 
        and ngo.ngo_id='".$_GET['delet']."'");
This query does not run because finance table is empty. Even if one table is empty, I still want the delete operation to take effect using the same script. Please help!!
 
     
    