Forum Moderators: coopster
1) student:
student_id
student_name
student_address
2)subjects
subject_id
student_id
subject_name
3)hobbies
hobby_id
student_id
hobby_name
what i want is that when i delete the record from student table it should delete all the records of that id from subjects and hobbies table, i am using phpmyadmin for creating tables and the type of the table is default MyISAM
Thanks
Farhan Nawazish
DELETE student, subjects, hobbies FROM student, subjects, hobbies WHERE [b]student.student_ID = 100 AND ([/b]student.student_id = subjects.student_id OR student.student_id = hobbies.student_id[b])[/b] Backup first!
Deleting Rows from MySQL [webmasterworld.com]