INT 21h

Select language

MySQL have IP addresses sorting function out of the box

№ 9046 В разделах: Programming Sysadmin от June 17th, 2018,
В подшивках:

If you sort your IP field as usual it will be sorted like string, but you can use INET_ATON() function to represent IP address string as integers:

SELECT * FROM bot order by INET_ATON(ip) asc

Sample result

Нет комментариев »

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Облачная платформа
Яндекс.Метрика

Fortune cookie: Today's spam: Every girl needs a vibrator. The best orga sm!