Hi,
i tried, but it didn't work at first. Nothing was shown in the mail.
When i changed this ->
$comment = ScreenshotsData::getLatestComment($ss_id);
to that
$comment = ScreenshotsData::getLatestComment($id);
it returns the comment but not the last one. If there are 2 comments bellow the picture the first(older) one is displayed.
Therefore i changed this
public static function getLatestComment($ss_id) {
$sql = "SELECT * FROM ".TABLE_PREFIX."screenshots_comments WHERE ss_id='$ss_id' ORDER BY ss_id DESC LIMIT 1";
return DB::get_row($sql);
}
to that
public static function getLatestComment($ss_id) {
$sql = "SELECT * FROM ".TABLE_PREFIX."screenshots_comments WHERE ss_id='$ss_id' ORDER BY id DESC LIMIT 1";
return DB::get_row($sql);
}
Now everything works fine !
*****************************************************************************************************************************************************
I also received an idea from @web541 .
Entering this into the Screenshots.php everything worked fine without changes in the ScreenshotsData.class
$comment = ScreenshotsData::get_comments($id);
$comment = end($comment);
Many thanks to both of you for your great help. 😍 😃