delete sponsors, sponsors_notes, sponsors_records from sponsors left join sponsors_notes on sponsors_notes.sponsor_id = sponsors.id left join sponsors_records on sponsors_records.sponsor_id = sponsors.id where sponsors.id = '$id'