Register Issues
Can I update two tables on one submit or do I need to inner join, left join or full join the tables?
Example:
I want to have a registration form that updates all the details you would hope a form to have... Some of those update able input fields are located in several different tables, User(UID), UserDetails(UDID), UserClass(UCID), Class(CID), ClassDetails(CDID), Franchise(FID) and FranchiseDetails(FDID).
I have the Users mysql table built like so...
CREATE TABLE `UserDetails` (
`UDID` int(10) NOT NULL auto_increment,
`FID` int(10) NOT NULL,
`UFname` varchar(255) NOT NULL,
`ULName` varchar(255) NOT NULL,
`USSN` int(9) NOT NULL,
`UCity` varchar(255) NOT NULL,
`UState` varchar(255) NOT NULL,
`UZipcode` int(5) NOT NULL,
`UPhone1` varchar(255) NOT NULL,
`UPhone2` varchar(255) NOT NULL,
`UReferred` varchar(255) NOT NULL,
`ULevel` int(2) NOT NULL,
PRIMARY KEY (`UDID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
I want to add the appropriate details to this table as well...
CREATE TABLE `User` (
`UID` int(10) NOT NULL auto_increment,
`CID` int(10) NULL,
`FID` int(10) NULL,
`UDID` int(10) NULL,
`UEmail` varchar(255) NOT NULL,
`UPass` varchar(255) NOT NULL,
PRIMARY KEY (`UID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
I still have the other 5 tables with literally the same question...
I want to carry the details in the smallest possible table as possible right? Store as much data in Session as possible right?
So again, do I JOIN all the tables in the registration page, put all the necessary details in Session and pull out the appropriate data based on 'ULevel' then? If so, which JOIN is best? If not, what would you suggest?
Any help would be great!
Thanks,
Ted