# Identifying classes in a PHP/MySQL OOP Blog System

**URL:** <https://forum.kirupa.com/t/identifying-classes-in-a-php-mysql-oop-blog-system/220998>\
**Category:** programming\
**Created:** [March 31, 2007, 8:15am UTC](https://forum.kirupa.com/t/identifying-classes-in-a-php-mysql-oop-blog-system/220998 "2007-03-31T08:15:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dk1983](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dk1983](https://forum.kirupa.com/u/dk1983)\
**Post date:** [March 31, 2007, 8:15am UTC](https://forum.kirupa.com/t/identifying-classes-in-a-php-mysql-oop-blog-system/220998/1 "2007-03-31T08:15:51Z")

</div>

Hi, I’m a long time reader / first time poster; so here goes:

Some information:

I’m currently attempting to write a blog system using OO PHP. I have two tables in a MySQL database - ‘blogentries’ and ‘comments’. Each comment has a foreign key ‘post\_id’ which links to the ‘id’ primary key in the ‘blogentries’ table.

My problem:

I assume I need at least a ‘blog entry’ object and a ‘comment’ object. I’ve had a go at writing some code, but found myself creating a new ‘main’ class and basically writing procedurally. I know in my gut I’m doing things wrong (or at least, not OO) and I’d like some help identifying what objects would be present in a blog system and what their functionality would be.

I’ve read through the most excellent tutorials on this site, including the ‘Introduction to OOP using PHP’. I guess some nice pseudo code would help me a lot!

Thanks in advance,  
David
