Answer the question
In order to leave comments, you need to log in
Get external ip and user agent?
I use java + tomcat + mysql on the backend and I want to fill in such a table, basically everything is entered in it by hand except for ip and user agent, how to do this and are the fields highlighted correctly?
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(30) NOT NULL,
`email` varchar(256) NOT NULL,
`password` varchar(32) NOT NULL,
`reg_date` datetime NOT NULL,
`ip` varchar(15) NOT NULL,
`user_agent` varchar(256) NOT NULL,
`phone` varchar (11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `nickname` (`nickname`),
UNIQUE KEY `email` (`email`),
UNIQUE KEY `phone` (`phone`)
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question