I have 3 tables. Locations, Units and phases.
Each location can have multiple units and each unit will have multiple phases.
Hence my database structure consists of foreign key associations as follows.
'Units.location_id' references 'Locations.id'
'Phases.unit_id' references 'Units.id'
When I delete a Location, all associated Phases of the Location and all the associated Units of each of these Phase should be deleted.
What would be the best procedure to do this ?
I am using PGSQL and PHP (CodeIgniter )
Jayakrishnan_gk 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.