I have change line 2323 in theme.inc to limit the number of comments to 20 :
$result = cpg_db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id $comment_sort_order LIMIT 20");
But I wuold like the lasts comment to be shown, how to do that ?
Could it be possible to errase oldest comments when a new one is entered ?
thanks
Change
ORDER BY msg_id
to
ORDER BY msg_id DESC
thanks foryour help, but adding "DESC" :
author_id, author_md5_id, msg_raw_ip, msg_hdr_ip, pid FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id DESC $comment_sort_order LIMIT 50"
gives me an error : error of request
of course you should remove then the variable that holds the sort order... otherwise you have it double in the satatment what leads to an error
ORDER BY msg_id DESC LIMIT 20
many thanks for your help !
to remove older comments than the last 50 ones is a way to do it (even if it is manually by a mysql request in php myadmin) ?
one issue per thread, see http://forum.coppermine-gallery.net/index.php?topic=22469.msg140696#msg140696