Page 2 of 2

Posted: Tue Mar 23, 2004 2:42 pm
by patrikG
just quickly: why don't you just install phpBB (takes <5mins), see what their DB-schema is and take some inspiration from that for your own board?

Just an idea to save you from re-inventing the wheel.

Posted: Wed Mar 24, 2004 2:49 am
by smithjasonuk
Have you ever heard of Radix?

Quickly, it is a piece of hardware and software that locks the hard drive, so that anything, and I mean anything including boot sector viruses new software, hardware, etc, will be wiped every time it reboots. We have just installed these on our computers. And i have a head technician that is quite put off with the idea of having anything put on his computers until, he has debugged our new images and made sure everything is running smoothly.

This is why I haven’t installed it, yes I agree, download it and put it on, but for what point!

I’m not near my home or college computer for another 24 hours, so until then as i said before I know I could just download it, but in the off chance I was asking if anyone had the solution there and then.

Posted: Wed Mar 24, 2004 6:08 pm
by McGruff
smithjasonuk wrote:Looking into it how would the posts table work

i thought it would look something like this

post_id (unique post id)

Topic_id (links to the topic table)

Forum_id (links to the forum table)
User_id (Linked to the user table)

subject

message

ect.

how can you reply to this post if the post_id is unique or how does the forum sort it self so that it knows where to send the posts to the correect topic ?

much app for an answer
A posts list query just needs a topic id.

More SQL

Posted: Thu Mar 25, 2004 3:10 am
by smithjasonuk
What then is the MySQL statement for insereting a new topic_id in the topics table and then puting this ID into the posts table

i.e.

Topic table example

*******************************

topic_id - PK auto inc
topic_subject

etc

*******************************

Post table example

*******************************

post_id - PK auto inc
topic_id - int
post_message

ect

*******************************

Posted: Thu Mar 25, 2004 8:08 am
by McGruff
I'm not sure why you'd want to do that?

Posted: Thu Mar 25, 2004 8:52 am
by smithjasonuk
Im tryin to create a link for a new post to the correct Topic i.e. when i reply to this topic it sorts the post to the topic_id

Im no good at explainin myself

Posted: Thu Mar 25, 2004 9:54 am
by McGruff
Pass the topic ID in the link (if you look at the reply button on this forum you can see a t=1971 - the topic ID).

In the form, create a hidden field for topic id.

When you insert a new post row, that would be available in the script as $_POST['t'] (with "post" form action).

GET vars -> hidden form fields -> POST vars.