How do I put IP addresses in order

Results 1 to 2 of 2

Thread: How do I put IP addresses in order

  1. #1
    Join Date
    Dec 1969

    Default How do I put IP addresses in order

    Hello everyone<BR><BR>I would like to display IP addresses in order. example<BR><BR><BR> 25<BR>My query will put at the top? <BR>Not just IP addresses but strings that contain both numbers and letters. ie<BR>John1<BR>john2<BR>john12<BR>john123<BR>I was hopeing I could get some idears to fix ths.<BR><BR>TIA<BR>DeathNight<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Padding...

    By padding all numbers out to the same length, with spaces or zeroes.<BR><BR>Instead of storing the IP address as<BR><BR>you must store it as<BR><BR><BR>And then they will all sort properly.<BR><BR>As for mixed numbers an names...Well, same answer.<BR> John0001<BR> John0002<BR> John0012<BR> John0123<BR><BR>Numbers, when used in strings, are *NOT* seen as numbers at all. They are just another character. Period.<BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts