Hi, recently there was few topics how to get the client computer IPs and how to register logins.
As an example you can have a look on my implementation for the registration of the client IP's both for the successful and unsuccessful logins.
https://nubuilderforte.blogspot.com/
Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Registering logins to the nuBuilder database
-
- nuBuilder Team
- Posts: 508
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 11 times
- Been thanked: 18 times
Registering logins to the nuBuilder database
If you like nuBuilder, please leave a review on SourceForge
-
- Posts: 156
- Joined: Wed Dec 23, 2020 12:28 pm
- Location: Russia, Volgograd
- Has thanked: 32 times
- Been thanked: 7 times
- Contact:
Re: Registering logins to the nuBuilder database
Thx, Janusz! Very useful information. Still would get the StorageProcedure's source code , so as not to reinvent the wheel. 

Wbr, miasoft.
Re: Registering logins to the nuBuilder database
Where can we get the programming code for this IP Address Logger?Janusz wrote:Hi, recently there was few topics how to get the client computer IPs and how to register logins.
As an example you can have a look on my implementation for the registration of the client IP's both for the successful and unsuccessful logins.
https://nubuilderforte.blogspot.com/
-
- nuBuilder Team
- Posts: 508
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 11 times
- Been thanked: 18 times
Re: Registering logins to the nuBuilder database
If you like nuBuilder, please leave a review on SourceForge
-
- Posts: 249
- Joined: Sun Dec 06, 2020 6:50 am
- Location: Chennai, India, Singapore
Re: Registering logins to the nuBuilder database
Your code in the blog is attached here.
Consider the hypothetical situation where a record exists for zx_IPs_id=ip but with
ips_OK_qty+ips_Bad_qty = 0
OR
(ips_OK_qty = 0 AND ips_Bad_qty = 0)
the INSERT parts would fail.
Quick Fix:
INSERT IGNORE....
Better Fix:
UPDATE statement on DUPLICATE Primary Key
The English Auto-generated (and corrected) transcript (remove the .txt extension) of the video is attached.
ips_OK_qty+ips_Bad_qty = 0
OR
(ips_OK_qty = 0 AND ips_Bad_qty = 0)
the INSERT parts would fail.
Quick Fix:
INSERT IGNORE....
Better Fix:
UPDATE statement on DUPLICATE Primary Key
The English Auto-generated (and corrected) transcript (remove the .txt extension) of the video is attached.
You do not have the required permissions to view the files attached to this post.
-
- nuBuilder Team
- Posts: 508
- Joined: Fri Dec 28, 2018 1:41 pm
- Location: Krakow, Poland
- Has thanked: 11 times
- Been thanked: 18 times
Re: Registering logins to the nuBuilder database
Such situation is not possible.apmuthu wrote:
Consider the hypothetical situation where a record exists for zx_IPs_id=ip but with
ips_OK_qty+ips_Bad_qty = 0
OR
(ips_OK_qty = 0 AND ips_Bad_qty = 0)
the INSERT parts would fail.
Always initial insert is setting the ips_OK/Bad_qty value to 1:
Code: Select all
...
INSERT INTO zx_IPs (zx_IPs_id,ips_OK_qty) VALUES (ip,1);
....
INSERT INTO zx_IPs (zx_IPs_id,ips_Bad_qty,ips_last_bad,ips_Bad_username) VALUES (ip,1,NOW(),user);
If you like nuBuilder, please leave a review on SourceForge