Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stuck with replies to msg's

Status
Not open for further replies.

ThomasJSmart

Programmer
Joined
Sep 16, 2002
Messages
634
hello,
i would very much apreciate any help anyone can give me with the following conundrum.

i'll keep it simple.

i have a msgboard. all posts are saved into a database. i can get the messages out and display these like this:

1- msg 1

2- msg 2

3- msg 3

BUT now i want to add the option to reply to a message. the replies have to be shown with the origional like this:

1 - msg1
- reply 1
- reply 2

2- msg 2

3- msg3
- reply 1
- reply 2
- reply 3

iv tried adding a new field called 'reply' to the database, if 'reply' == 0 then it is an original post. if it is a reply then the "reply" field holds the ID for the origional post.

i started of thinking this would be very logical but now im stuck :-(

how do i get it to work??

if you have the time please explain, this is of more use to me than a chunk of code ;-) many thanks.


I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
You're on the right track with the idea of the reply column.

It seems pretty straighforward. On any page on which a reply might be made to a post, store the thread it on the page somewhere.

Then use that data in your insert query.

Want the best answers? Ask the best questions: TANSTAAFL!
 
sorry was i a bit to vague on the end, iv got the insert part, its the display part im stuck with,

thanks,

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
recursion? let me check the php manual on that.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
I doubt there is anything in the PHP manual about recursion, except to say that PHP supports it. Recursion is a programming technique, not a PHP function.

Now, after getting after DaRNCaT about asking fundamental questions in thread434-528064, do you want me to answer or let you figure it out for yourself?

Want the best answers? Ask the best questions: TANSTAAFL!
 
im going to go check google for recursion first, if i get stuck on anything specific i'll be back :-)

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
thats ok, iv got it working already.

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top