Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
|
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 20th, 2006, 11:40 AM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Approving comments

Silly question from a beginner, using phpMyAdmin.

I'm using PHP and MySQL to develop my personal blog. One of the features is a comments table in the blog database, so that visiters record their comments on a form, and the form data is inserted into the comments table as a new row. And obviously, comments are retreived and displayed via a SELECT SQL query.

What's missing is a method for me to approve comments before they are made public. How do I go about this? I'm sure there must be a quick method but can't work out what it would involve.

Any assistance much appreciated :)
 
Old October 23rd, 2006, 03:10 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hai,
add a new filed call status in the same table, by default put the value as 0,
in selection condition select * from tablename where status = 1, if you approve comments put the status as 1, hope it will help you.


surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
 
Old October 23rd, 2006, 07:07 AM
Authorized User
 
Join Date: Jan 2006
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for this advice, I will give it a go!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing Comments in one go Pankaj C XSLT 3 September 9th, 2007 07:05 AM
Comments janees ASP.NET 1.0 and 1.1 Professional 1 April 8th, 2007 09:27 PM
Comments in my javascripts 6 xristina Javascript 5 November 4th, 2004 04:08 PM
Comments in my javascripts 5 xristina Javascript 1 November 4th, 2004 10:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.