title: Best way to sort by IP addresses in SQL
body: <p>I connect to my SpiceWorks database via PHP using the SQLITE3 PDO. I am trying to display a list of devices in order by IP address. Here is my current query:</p>
  
  <pre><code>SELECT name, ip_address FROM `devices` ORDER BY ip_address
  </code></pre>
  
  <p>The problem with this is that it organizes them weird like this:</p>
  
  <p><img src="https://i.stack.imgur.com/33hwW.png" alt="enter image description here"></p>
  
  <p>Is there any easy way to fix this problem?</p>
  
  <p>It is not possible for me to edit the database because it would through SpiceWorks off. I need a way to do this in SQL.</p>