I've got a small problem. As all who post here usually do.
I've got my table
CREATE TABLE IF NOT EXISTS `attractions` ( `attID` int(11) NOT NULL AUTO_INCREMENT, `attName` varchar(255) NOT NULL, `adultPrice` double NOT NULL, `childPrice` double NOT NULL, `referenceID` int(11) NOT NULL, PRIMARY KEY (`attID`), UNIQUE KEY `attName` (`attName`) ) ENGINE=InnoDB;
Within my table, referenceID is a key field which references attID.
When I insert a record into my table, how can i make sure that if no other attID field is specified in the referenceID that the new attID is inserted??
Thx in advance,