Randy
Joined: 07 Apr 2006
Posts: 2
Posted: 2006-04-07 21:00
Back to top
Reply with quote
|
mySql has a function
INET_ATON
that converts a VARCHAR ip address field to a number. How can I use this function to sort my VARCHAR ip address field?
|
Randy
Joined: 07 Apr 2006
Posts: 2
Posted: 2006-04-08 00:58
Back to top
Reply with quote
|
This may not be p.c. but here is what I did:
In phpMyEdit.class.php add the following line:
if ($sort_field=='PMEtable0.ip') {
$sort_field = "INET_ATON($sort_field)";
}
right after:
$sort_field = $this->fqn($field);
Thank you open source.
Now the challenge is to find a better solution.
|
ajh
Joined: 17 Dec 2003
Posts: 236
Posted: 2006-04-11 17:08
Back to top
Reply with quote
|
Have a look at the 'sql' option...you could create a virtual field and then sort by it.
|
Post new topic
Reply to topic
|
|
|