please help php and mysql...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
otd
Forum Newbie
Posts: 18
Joined: Mon May 21, 2007 8:50 am

please help php and mysql...

Post by otd »

Hi,

quite new to php, and would appreciate any help on this, i have partially created a basic forum using php and mysql. im having a problem that when i (admin) delete a reply under a topic it deletes but in the question table there is a column that lists how many replies there has been and this isnt being updated therefore need a bit of code that minuses 1 from this column under that particular question that the reply is being deleted from.

here are the details-

Everah | Database details deleted. There is really no need for them here. Not to mention you shouldn't be posting sensitive information anyway. ;)

Please help!!
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Code: Select all

$sql = "UPDATE forum_question SET replies = replies - 1 WHERE id = ".$id_number;
otd
Forum Newbie
Posts: 18
Joined: Mon May 21, 2007 8:50 am

Post by otd »

have tried this, but unfortunately it doesnt work, still not knocking the replies down.....any ideas???
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Descriptive subjects

Post by feyd »

[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Show some actual now so we can see what the app is seeing.
Post Reply