[thelist] add comments to a home-made blog

Roger H. rogerharness at sbcglobal.net
Sun Jun 13 18:16:45 CDT 2004

hello 'volters,

Relative PHP/MySQL newbie/novice here.

I have a very simple blog-type thing. I have a MySQL table named "rambling",
with 3 fields;
entry, and
entry_num (my primary key)

On my home page, i simply display the record with the largest entry_num for
the most recent entry, and on the blog page itself, i just 'select * from
rambling' (there's not that many...yet), with largest entry_num first, on

Not sure if thats the most efficient, but it seems to work ok for me.

Anyways, i'd like to add "VIEW COMMENTS (x)" and a "POST COMMENTS" links for
each entry shown.

I've been googling, and im pretty sure i need another table with 1 to many
set-up. Right?

So maybe i'd create a rambling_comments table. I could have;
comment_num (primary key?)
entry_num (from my rambling table, right?)

does this make sense? and if so, im not sure how that entry_num is even
going to GET into my rambling_comments table!

Anyways, i know i havent thought this through NEARLY enough, and I was just
wondering if anybody could point me in the right direction for some
tutorials etc, for doing this.

As always, tia, so much!

-Roger Harness

More information about the thelist mailing list