Hi,
I have table structures like so..
I want to delete all member, reports and photos from the specific member..Code:CREATE TABLE members ( memberid int(25) NOT NULL auto_increment, firstname varchar(55) NOT NULL default '', lastname varchar(55) NOT NULL default '', PRIMARY KEY (memberid) ) TYPE=MyISAM; CREATE TABLE reports ( reportid int(25) NOT NULL auto_increment, memberid int(5) NOT NULL default '0', PRIMARY KEY (reportid) ) TYPE=MyISAM; CREATE TABLE photos ( photoid int(25) NOT NULL auto_increment, reportid int(5) NOT NULL default '0', photoname varchar(55) NOT NULL default '', PRIMARY KEY (photoid) ) TYPE=MyISAM;
The member record and report records are easy but am a bit lost on best way to pick up on the photos that correspond to each report being deleted.. Should I be using a query and join to grab the corresponding photos for unlink?
Cheers



Reply With Quote





Bookmarks