tags:

views:

35

answers:

1

hi guys now i searched for comments system one of my friends suggest to me this Advanced PHP Comments System With jQuery and i download from his tutorial like Jooria-Comments-0.02.zip [5.17 KB] http://www.jooria. com/downloads/442/Jooria-Comments-0.02.zip

its really nice but the only disadvantage is it add the insertedd comment in the bottom of the old comments

i want it add the new one in the top on old comments

+1  A: 

You need to sort commends descending within query fetching the comments something like below:

 select * from comments order by id desc
Sarfraz
this will arrange the old commentsbut i want the new one inserting in the topplease download the script and test it you will understand
moustafa
Sounds like you need to modify the javascript. Look for where it `append`'s the comment and change it to `prepend` or where it's calling `after` and go from there. The [jQuery docs](http://docs.jquery.com/Manipulation) will help.
Blair McMillan
@moustafa: that query will bring new records on top.
Sarfraz
Possibly the javascript it just adding it to the end of the list when it gets posted though.
Blair McMillan