Help with database query. |
Hey guys,
For some reason today I just can't seem to think. I am currently working on part of my Forums solution, and I am working on the 'delete comment' function. Now where my problem lies is in the 'discussions' table I store the 'last_comment_id'. When you bring up the front page of the forums ( with all the discussions listed ) it says 'Last comment by {username}'. Now on to my question. Lets say I have 10 comments for that discussion, and just for example sake the ID's of them comments are 1 through to 10. I want to delete 10, what i need to do is grab the comment ID before 10 ( so 9 ) for this discussion. How would I go about doing this? As I said I know its a really daft question but my brain has turned into mush and I just can't seem to think straight. Any help would be appreciated guys. Chris |
Messages In This Thread |
Help with database query. - by T3utonicT3rror - 04-23-2015, 04:38 AM
RE: Help with database query. - by Rufnex - 04-23-2015, 05:03 AM
RE: Help with database query. - by T3utonicT3rror - 04-23-2015, 05:16 AM
|