I have many fields wich stores IP-address as INT as a result of ip2long() function.
Please add a transformation option to view this fields as a normal IPv4 address.
How do you suppose the column be detected as a network address?
a) You can't detect it by type - there are far too many uses for UNSIGNED INTEGER
b) You can't detect it by name - there are far too many variations
However, the addition of functions INET_ATON and INET_NTOA would be nice
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You miss the whole point of my comment... Its easy to convert text to IP and vice versa - both in PHP or using MySQL functions INET_NTOA/INET_ATON
The point is, which columns to convert and which not
For example, I might store 4 integers in a VARCHAR column, separated by ".", and they even might be in range 0-255 each, but they are definitely not IP addresses.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@gert_p: transformation is an option in phpMyAdmin that has to be defined for every field, this is not done automatically, so there is no need to guess what fields are long ips and what not - this is defined by the user
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I understand, it's not a good idea to automatically determine the INT (or other) fields ;)
It's impossible and I don't suggest to do it.
I use "transformations" and feel good.
So, it might be a usefull transformation and I suggest to include it in the PMA package.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There is also the issue of ipv6 which is a 4 long word address. Trying to auto detect if an address is stored as an int just falls apart in this case. There is already the ability to store the meta information about a given database in the phpmyadmin database. IMHO, it would be better to include this information there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
gert_p,
I think you still missed the point of this feature request. It is a request to provide a standard transformation in the normal distribution in the same manner as the text/dateformat and etc. transformations which the user then selects for a specified column. No detection of what it is is even necessary since the user is the one who decides to have the transformation applied.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=1894217
Originator: NO
How do you suppose the column be detected as a network address?
a) You can't detect it by type - there are far too many uses for UNSIGNED INTEGER
b) You can't detect it by name - there are far too many variations
However, the addition of functions INET_ATON and INET_NTOA would be nice
Logged In: YES
user_id=1868708
Originator: YES
For example:
<?php /* libraries/transformations/text_plain__long2ip.inc.php */
function PMA_transformation_text_plain__long2ip($buffer, $options = array(), $meta = '') {
return long2ip($buffer);
}
?>
or something like this.
It would be nice, if you include this feature in the distribution.
Logged In: YES
user_id=1894217
Originator: NO
You miss the whole point of my comment... Its easy to convert text to IP and vice versa - both in PHP or using MySQL functions INET_NTOA/INET_ATON
The point is, which columns to convert and which not
For example, I might store 4 integers in a VARCHAR column, separated by ".", and they even might be in range 0-255 each, but they are definitely not IP addresses.
Logged In: YES
user_id=326580
Originator: NO
@gert_p: transformation is an option in phpMyAdmin that has to be defined for every field, this is not done automatically, so there is no need to guess what fields are long ips and what not - this is defined by the user
Logged In: YES
user_id=1868708
Originator: YES
I understand, it's not a good idea to automatically determine the INT (or other) fields ;)
It's impossible and I don't suggest to do it.
I use "transformations" and feel good.
So, it might be a usefull transformation and I suggest to include it in the PMA package.
Logged In: YES
user_id=913645
Originator: NO
There is also the issue of ipv6 which is a 4 long word address. Trying to auto detect if an address is stored as an int just falls apart in this case. There is already the ability to store the meta information about a given database in the phpmyadmin database. IMHO, it would be better to include this information there.
Logged In: YES
user_id=194590
Originator: NO
gert_p,
I think you still missed the point of this feature request. It is a request to provide a standard transformation in the normal distribution in the same manner as the text/dateformat and etc. transformations which the user then selects for a specified column. No detection of what it is is even necessary since the user is the one who decides to have the transformation applied.