I want to show in my page that the database they were looking at was last modified on a certain date & time. I have the following code for that:
$lastUpdate = $pdo->prepare("SELECT lastUpdate FROM bng WHERE lastUpdate IN
(SELECT max(lastUpdate) FROM bng)");
$lastUpdate->execute();
As I mentioned in the title, I want to echo the result on my page, I tried:
<?php
echo '<p>Database Last Modified on '.date("l, d F Y - h:i:s A",strtotime($lastUpdate)).'</p>';
?>
but it gives me the wrong data and an error message
Warning: strtotime() expects parameter 1 to be string,
Hope this question makes sense. Thanks in advance.