My intention with the below code is display the difference between two timestamps in seconds, but nothing is showing at all. I´ve added echo $ts for you to see what $ts contains:
$ts = $value['time'];
echo $ts;
$sql = "SELECT TIMESTAMPDIFF(SECOND,(CURRENT_TIMESTAMP),'$ts')";
$diff = mysql_query($sql);
echo $diff;
The result is:
2017-01-26 16:30:51
Hence it only shows the content of $ts, not what the time difference is. Help with understanding what I´m doing wrong would be appreciated, thanks!