title: MySQL select timestamp col as seconds
body: <p>I wanna select a timestamp column that contain a date.</p>
  
  <p>I want the result in <strong>seconds</strong>, I've tryed this but <strong>it's not working</strong>.</p>
  
  <pre><code>$req = $database-&gt;query('SELECT energy, maxEnergy, DATE_FORMAT(last_attack, "%s") FROM users WHERE id = '.$userID.'');
  </code></pre>
  
  <p><strong>last_attack column contain :</strong> 2018-09-05 09:26:38</p>
  
  <p>And the result give me : <code>["DATE_FORMAT(last_attack, "%s")"]=&gt; string(2) "38"</code></p>
  
  <p>I don't want the seconds in my date, I want all the date converted in seconds...</p>
  
  <p>What am I doing wrong ? Thanks.</p>