I want to get the last date from a table. So I can show the last added or changed item:
$qry = "
Select
MAX(changedate)
FROM
producten
";
$stmt = $connection->prepare($qry);
$stmt->error;
$stmt->execute();
$result = $stmt->get_result();
$up = $result->fetch_assoc();
$stmt->close();
$main .='Last update '.$up['changedate'];
But I receive this error message:
Notice: Undefined index: changedate in /home/jcslnl/domains/jcsl.nl/public_html/michael/paginas/home.php on line 22
Is this because MAX is not longer supported? Or should I continue to search for the error?
It could also be that I did something wrong in the table, it's the firsttime i used timestamp i.s.o. unix timestamp.