There are several lines in that function that do not use regular mysql functions - for example, sql_query(), sql_fetch_array(), tb(), and avatar() are user-defined. I can guess at what they do, but I cannot know that I am correct, or even if I am, that what I suggest will be compatible with your existing system.

Originally Posted by
sofian
in fact i have asocialnetwork that work like facebook exactly .
what CMS (or other web software) are you using?
What is the name of the software? This is important, because we will be able to give you a better answer and/or find other help for you if we know what you are using now.
Without knowing, we must resort to guesswork and trial and error.
From what you posted, it appears that your comment_display() function, as well as its calling function comment_publish(), only deals with a single comment. That means that there is some other function involved that determines what order the comments are displayed in (or perhaps not - and the comments are simply displayed in their natural order).
In any case, it is impossible to offer further advice without knowing something about your existing code structure.
Bookmarks