select concat(conv(inet_aton(ip),10,32),'_',conv(unix,10,32))ip_unix from (select UNIX_TIMESTAMP()as'unix','255.255.255.255'as'ip')t
ip_unix |
---|
3VVVVVV_1GQLT0A |
select inet_ntoa(conv(SUBSTRING_INDEX(ip_unix,'_',1),32,10))'ip',conv(SUBSTRING_INDEX(ip_unix,'_',-1),32,10)'unix' from (select '3VVVVVV_1GQLT0A'as'ip_unix')t
ip | unix |
---|---|
255.255.255.255 | 1638593546 |