View Full Version : Help me with this Idea

09-22-2009, 12:55 AM

I have made a Module for a portal System called xoops , this is my first time to do such thing . any way this Module is to Like Shoutbox But not exactly ShoutBox , its where Visitors Can post Comments On you yours Site ..

I need to make the posted Comment is approved after View it from the Admin.

My idea to do this is , to make a Tabel for approved Message and another for waiting approve.

Ok Now lets Say some 1 posted a Comment then it will be inserted to the waiting approve tabel , and when the admin Sign in and see the waiting message he can click edit and when page open he click Approve where the Message again will be moved from waiting approve tabel to approved Tabel .

IS that the right way to do it or there some other better way .. and so with that idea i have problem that the waiting Approve message stays on the tabel after moving it to approved tabel its like re-sumbit ..

i need it when Moved to the approved tabel to be deleted from waiting Tabel so admin dont approve it agin and agin ..

So any suggetion..

09-22-2009, 01:15 AM
have them all in the same table rather than using 2 tables.

have a column that defaults to 0 (pending admin view)
on admin view set that column to 1

on your display front end for the public only pull the records out where your column =1

so your sql statements will be something like

"SELECT * FROM `tbl` WHERE `Status`=0"
to show your pending approval ones

"SELECT * FROM `tbl` WHERE `Status`=1"
to show your approved ones

Phil Jackson
09-22-2009, 08:57 AM
*agree's with above*

09-22-2009, 09:03 AM
Thank you , On the Second thought , it seems this will result in high load to my Site . maybe just make it For only Registered Members rather than make it waiting approval.

Phil Jackson
09-22-2009, 09:06 AM
Can i ask what your looking for in an "approval" ?

09-23-2009, 12:52 AM
Hello Phil

problem Solved as all Ya Recomended .. thx