Display Last 5 Phorum Posts -script
Posted by dagon
Re: Display Last 5 Phorum Posts -script June 29, 2004 01:36PM |
Registered: 20 years ago Posts: 666 |
Re: Display Last 5 Phorum Posts -script July 09, 2004 01:25PM |
Registered: 22 years ago Posts: 109 |
Re: Display Last 5 Phorum Posts -script July 13, 2004 12:17PM |
Registered: 20 years ago Posts: 666 |
The one I use now is:
$result = mysql_query("SELECT * FROM $table m, $forum_table f WHERE m.forum_id = f.forum_id AND f.forum_id != 31 AND f.forum_id != 2 AND f.parent_id !=22 AND m.status != '-2' ORDER BY m.datestamp DESC limit $number") or die("Failed Query of " . $result. mysql_error());
Pretty much tells it to take all but from certain forums (31 and 2) and from forums in folder 22. m.status != '-2' means it ignores hidden messages, and won't display them.
$result = mysql_query("SELECT * FROM $table m, $forum_table f WHERE m.forum_id = f.forum_id AND f.forum_id != 31 AND f.forum_id != 2 AND f.parent_id !=22 AND m.status != '-2' ORDER BY m.datestamp DESC limit $number") or die("Failed Query of " . $result. mysql_error());
Pretty much tells it to take all but from certain forums (31 and 2) and from forums in folder 22. m.status != '-2' means it ignores hidden messages, and won't display them.
Re: Display Last 5 Phorum Posts -script July 13, 2004 12:53PM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Display Last 5 Phorum Posts -script July 13, 2004 12:55PM |
Registered: 20 years ago Posts: 666 |
I don't know, it works for me. I tested it out by hiding one of my messages. I had left out that part, and it showed all messages, including the hidden. Then I added it in, and it showed all messages except for the hidden one. All hidden messages in my database have the status number of -2.
Re: Display Last 5 Phorum Posts -script July 13, 2004 01:03PM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Display Last 5 Phorum Posts -script July 13, 2004 01:22PM |
Registered: 20 years ago Posts: 666 |
Re: Display Last 5 Phorum Posts -script July 13, 2004 01:24PM |
Admin Registered: 21 years ago Posts: 9,240 |
Re: Display Last 5 Phorum Posts -script July 13, 2004 01:30PM |
Registered: 20 years ago Posts: 666 |
Yes, when I say hidden, I mean unapproved, hidden from view. What other hidden is there?
Edit: Aren't hiding messages and replies unapproving them, or are you referring to the posts in forums where they have to wait to be approved before being shown? I could see that.
Edited 1 time(s). Last edit at 07/13/2004 01:31PM by portal of curiousity.
Edit: Aren't hiding messages and replies unapproving them, or are you referring to the posts in forums where they have to wait to be approved before being shown? I could see that.
Edited 1 time(s). Last edit at 07/13/2004 01:31PM by portal of curiousity.
Re: Display Last 5 Phorum Posts -script July 13, 2004 01:33PM |
Admin Registered: 21 years ago Posts: 9,240 |
Sorry, only registered users may post in this forum.