Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Sorting comments  (Read 3100 times)

0 Members and 1 Guest are viewing this topic.

jensb

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Sorting comments
« on: October 19, 2005, 06:32:07 pm »

Hi !

Is there a way to display pic comments with in reversed order .. ie newest first ?

thankful for any help I get :)

regards Jens
« Last Edit: October 22, 2005, 07:05:36 am by Abbas Ali »
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: Sorting comments
« Reply #1 on: October 19, 2005, 07:47:55 pm »

Edit displayimage.php

Replace (in function html_comments)

Code: [Select]
$result = 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 FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id ASC");

with

Code: [Select]
$result = 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 FROM {$CONFIG['TABLE_COMMENTS']} WHERE pid='$pid' ORDER BY msg_id DESC");


Abbas
Logged
Chief Geek at Ranium Systems

jensb

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Sorting comments
« Reply #2 on: October 22, 2005, 06:05:25 am »

thanx mate :)
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.