This is the basic table structure for my contact section on many projects I work on…
The id field is auto_increment and the time field is just a PHP time() string.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
CREATE TABLE `contact` ( `id` int(11) NOT NULL, `Name` varchar(30) NOT NULL, `Email` varchar(90) DEFAULT NULL, `Message` varchar(5000) DEFAULT NULL, `time` varchar(15) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; ALTER TABLE `contact` ADD KEY `id` (`id`); ALTER TABLE `contact` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT; COMMIT; |