Ben
Ben

Reputation: 2564

mysql copy data from another column

I have 2 columns, ip_start, ip_start_long

ip_start        |  ip_start_long
------------------------------------
0.255.255.255   |  16777215

I need to convert ip_start (INET_ATON) and copy update to ip_start_long for all rows (1 million rows)

How can I do it in php or phpmyadmin?

Upvotes: 0

Views: 49

Answers (1)

DevZer0
DevZer0

Reputation: 13525

well simple query will do this for you

update table set ip_start_long = INET_ATON(ip_start);

Upvotes: 2

Related Questions