Randy
Založený: 07.04.2006
Príspevky: 2
Zaslal: 2006-04-07 21:00
Návrat hore
Odpovedať s citátom
|
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
Založený: 07.04.2006
Príspevky: 2
Zaslal: 2006-04-08 00:58
Návrat hore
Odpovedať s citátom
|
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
Založený: 17.12.2003
Príspevky: 236
Zaslal: 2006-04-11 17:08
Návrat hore
Odpovedať s citátom
|
Have a look at the 'sql' option...you could create a virtual field and then sort by it.
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|