Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将 IPv4 地址存储在 DB 中VARBINARY(4):四个字节的无符号整数。非常奇怪的方法,是的:)
VARBINARY(4)
如何在 MySQL 中将其转换为无符号整数?
糟糕且缓慢的解决方案:CONV(HEX(table.ip),16,10)
CONV(HEX(table.ip),16,10)