Custom validation against table

12 years 11 months ago - 12 years 11 months ago #164236 by CalvinMcGee
Custom validation against table was created by CalvinMcGee
I have the following table:
academy_validation
(
id INT(11) PRIMARY KEY AUTO_INCREMENT,
valid_key VARCHAR(128),
start_date DATE,
end_date DATE,
user_key INT(11)
)

Upon registration i want a field, Validation Code. I want the validation to check the entered value against academy_validation.valid_key where user_key IS NULL. If validated updates academy_validation.user_key with user id. When viewing profile I want to show academy_validation.valid_key, academy_validation.start_date and academy_validation.end_date.

How to achieve this?

Oh, and I'm using CB 1.4, J 1.6.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.142 seconds

Facebook Twitter LinkedIn