Page 1 of 1

please help php and mysql...

Posted: Mon May 21, 2007 8:59 am
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!!

Posted: Mon May 21, 2007 9:42 am
by Grim...

Code: Select all

$sql = "UPDATE forum_question SET replies = replies - 1 WHERE id = ".$id_number;

Posted: Tue May 22, 2007 4:10 am
by otd
have tried this, but unfortunately it doesnt work, still not knocking the replies down.....any ideas???

Descriptive subjects

Posted: Tue May 22, 2007 7:07 am
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.

Posted: Tue May 22, 2007 10:26 am
by RobertGonzalez
Show some actual now so we can see what the app is seeing.