Added line to display when the list was created and a comment if there

is one.
This commit is contained in:
jens 2021-02-26 15:26:01 +01:00
parent e7c5df6416
commit a47aa75306

View File

@ -162,6 +162,20 @@
if(oneListExists())
{
$SQL_command = "SELECT * FROM lists ORDER BY creationTime DESC LIMIT 0,1";
$mysqli_result = DBLink::getDbLink()->query($SQL_command);
if ($row = mysqli_fetch_object($mysqli_result))
{
echo "List created on ".date("l, d.m.Y", ($row->creationTime)/1000)." at ".date("G:i:s", ($row->creationTime)/1000)."<br />";
if(isset($row->comment) && strlen($row->comment) > 0)
echo "<i>".$row->comment."</i><br />";
echo "<br />";
}
$SQL_command = "SELECT * FROM listEntries INNER JOIN products ON listEntries.productId=products.id INNER JOIN storeTypes ON products.storeTypeId = storeTypes.id WHERE listEntries.listId=(SELECT id FROM `lists` ORDER BY creationTime DESC LIMIT 1) ORDER BY storeTypes.name, products.name ASC";
$mysqli_result = DBLink::getDbLink()->query($SQL_command);