I have a problem, I have table ‘ip_address’ with 4 fields:
– id_ip
– client_id
– client_ip
– mac_address
I have added new field named ‘router’ and I need to fill it up, as I have 800 rows manually will very hard, is it possible to do that in some kind of oneliner from phpMyAdmin?
‘router’ is generally x.y.z.1 where x.y.z are first octets from field ‘client_ip’
Sample row:
1 ; 8001 ; 10.3.8.2 ; 00:00:00:00:00:AA ; 10.3.8.1
See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_substring-index