title: mySQL Order By String
body: <p>I am using the following function to SELECT and ORDER some images from my DB, but the ORDER does not work.</p>
  
  <pre><code>$qry="SELECT * FROM modzzz_articles_screenshots WHERE entry_id='".$aDataEntry['id']."'";
  $qryr=mysql_query($qry) or die("Error selecting: ".mysql_error());
  
  while($qryrow = mysql_fetch_array($qryr)) {
  
     $media_book_id = $qryrow['media_id'];
     $qry2="SELECT * FROM bx_photos_main WHERE ID='".$media_book_id."' ORDER BY Title DESC";
     $qryr2=mysql_query($qry2) or die("Error selecting: ".mysql_error());
  
     while($qryrow2 = mysql_fetch_array($qryr2)) {
  
          $photo_book_id = $qryrow2['ID'];
          $a = array ('ID' =&gt; $aAuthor['ID'], 'Avatar' =&gt; $photo_book_id);
          $aMedia_book_icon = BxDolService::call('photos', 'get_image', array($a, 'file'), 'Search');
          $aMedia_book_iconUrl = $aMedia_book_icon['file'];
          $sRet .='&lt;a class="fancybox" rel="gallery" href="'.$aMedia_book_iconUrl.'" title=""&gt;&lt;img src="'.$aMedia_book_iconUrl.'"&gt;&lt;/a&gt;';
  
     }
  }
  </code></pre>
  
  <p><code>ORDER BY title ASC</code> or <code>DESC</code> always returns the same thing.</p>
  
  <p>Is there any error?</p>
  
  <p>Could the problem be that the Title column is not an INT value but VARCHAR?</p>
  
  <p>If that's the problem, I cannot change the column Title, is there an easy way to order the result anyway?</p>
  
  <p>Thanks</p>