SQL generated columns: Add three hours to the value in the logintime to find the value of current column | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

SQL generated columns: Add three hours to the value in the logintime to find the value of current column

what SQL query do i run to make the value of login_again column always three hours added to the login_time column timestamp, i know i have to use the clause GENERATED AS somewhere with some SQL arithmetic operations, thanks guys. Am implementing Brute force attack protection for a certain web application.

31st Aug 2020, 7:29 PM
Timothy Njiru
Timothy Njiru - avatar
7 Answers
+ 1
How can this work as protection against brute force attack can you enlighten me please?
31st Aug 2020, 8:15 PM
Ipang
+ 1
Database driven login control bro
1st Sep 2020, 2:41 AM
Timothy Njiru
Timothy Njiru - avatar
+ 1
Bro I would like to know more about how it works. If you don't mind to pass me a link or something to get started with. I appreciate it ...
1st Sep 2020, 3:08 AM
Ipang
+ 1
We database with the number of login attempts made and then we select this value and check if its greater than three if it then we redirect to a page with a login again count down
1st Sep 2020, 3:19 AM
Timothy Njiru
Timothy Njiru - avatar
+ 1
Alright, Thanks for the case example ... And good luck with the solution bro! 👍
1st Sep 2020, 3:21 AM
Ipang
+ 1
Thanks bro
1st Sep 2020, 3:22 AM
Timothy Njiru
Timothy Njiru - avatar
0
The number of login attempts is echoed to javascript from php and then you use if logic to redirect to page with count down
1st Sep 2020, 4:38 AM
Timothy Njiru
Timothy Njiru - avatar