When a user registers an account, I issue a verification code that is later used to verify the account. Once verified, the account is marked verified=1
and the verification code erased. Should such data like the verification code be placed in a separate table?
This is of course much better to store temporary data separate from nontemporary. There is no need to store that key in the account table. Have some tblVerificationCodes with FKs to the account table, timestamps etc etc and delete (or archieve if needed) data from this table when its possible. This is very good style.
if you plan to store some other data, like verificationDate, ipAddress, etc. you should use a different table for verification information. But if you do not plan to use any data, but the "verified" column, about the verification, only one column can be stored in the same table,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With