title: Query select between dates unix timestamp and date formats
body: <p>I'm trying to select all dates between 2 dates. In the database I have records in unix timestamp format while my date_ini and date_final variables are in date format (00-00-00 00:00:00)</p>
  
  <pre><code>    $msgs = mysql_query("SELECT date_time, from_user_name, message 
                           FROM message_log
                           WHERE date_time BETWEEN '$log_ini' AND '$log_fim' 
                           AND (from_user_name = '$usuario' OR from_user_name = '$atendente')")or die(mysql_error());
  </code></pre>
  
  <p>It simple returns null.
  I'm sure there are records that match the select.
  I have checked also the date_default_timezone_set and set it to same time to the server.
  I know this is a silly one, but I'm getting really frustrated! It's been hours I'm trying everything, FROM_UNIXTIME function, no coman, coman, &lt;> operators, strotime in the variables before, and nothing works... Can someone point out where is the mistake? Thanks a lot!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I got the problem, it's the date_time fiels, which is actually not really unixtimestamp, but unix time + 3 digits. SORRY, was my mistake and the answer was good. I'm open another question to find now how to deal with this fiel in this formt. Thanks a lot!</p>