I have problem to delete data in database.I add delete button to delete unnessary data. but when i try to delete those data in database i found a problem because of forign keys.how can i delete those data in tables with related data in other tables.please someone help me.Thanks

There are two methods:

1. Before deletion of a row of primary key table remove all rows from the foreign key tables.
2. Use "CASCADE" delete rule while adding "Relations".

commented: Concise and accurate +1
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.