We have a control panel our customers log into. They are able to create DNS Zones for IP Addresses we assign to them. The resulting zones are stored in a zones table on our sql server. All of the associated DNS records are created in a "records" table in the sql server. When they remove or "delete" zones they are removed from the zones table but "orphaned" records remain in the "records" table. These orphaned records are later found by our cron jobs on a linux server and dns records are created for them even though they should no longer exist. We need the PHP scripts fixed so when zones are changed or deleted, the corresponding "records" rows are also updated properly. and would also like a script we can run that will rebuild the records table completely from the zones, ips, and nameservers tables when necessary. All of the scripts are written in PHP. We need this project fixed right away.