-1
My table is constituted as follows:
CREATE TABLE `AgendaVisitas` (
`id` int NOT NULL AUTO_INCREMENT,
`title` int DEFAULT NULL,
`respons` varchar(255) DEFAULT NULL,
`contact` varchar(20) DEFAULT NULL,
`title1` varchar(255) DEFAULT NULL,
`contact1` varchar(20) DEFAULT NULL,
`start` datetime DEFAULT NULL,
`end` datetime DEFAULT NULL,
`DataRegisto` datetime DEFAULT NULL,
`colaborador` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
I need that column title
be it unique key
for 7 days.
Example:
The week begins on Monday and ends on Sunday. If you register code 525 in the column title
On Tuesday of this week, I can only re-register the same code the following week, after Sunday. I want this action every week. I can only register the same code once a week.
How can I do this deed?
I’m far from the best with database, but in this case do this kind of verification by back-end would not be enough? :]
– Luiz Felipe
Another possible solution is with the use of triggers in the bank itself.
– Zack Stone