Thu, Nov 24, 2005, 1:00am A smattering of tables
Blogging » Making This Blog
(Last updated: Thu, Aug 14, 2008, 6:36am)
  1  mysql> desc subject;
2 +--------+------------------+------+-----+---------+----------------+
3 | Field | Type | Null | Key | Default | Extra |
4 +--------+------------------+------+-----+---------+----------------+
5 | id | int(10) unsigned | | PRI | NULL | auto_increment |
6 | name | varchar(30) | | | | |
7 | parent | int(10) unsigned | YES | | NULL | |
8 +--------+------------------+------+-----+---------+----------------+


  1  mysql> desc blog;
2 +-----------+------------------+------+-----+---------+----------------+
3 | Field | Type | Null | Key | Default | Extra |
4 +-----------+------------------+------+-----+---------+----------------+
5 | id | int(10) unsigned | | PRI | NULL | auto_increment |
6 | title | varchar(30) | YES | | NULL | |
7 | tempTitle | varchar(30) | YES | | NULL | |
8 | text | text | | | | |
9 | keywords | text | YES | | NULL | |
10 | subjectID | int(10) unsigned | YES | | 0 | |
11 | added | datetime | YES | | NULL | |
12 | modified | timestamp(14) | YES | | NULL | |
13 +-----------+------------------+------+-----+---------+----------------+


Simple subject hierarchy with single-inheritance. I think I'll have anything with a NULL parent be considered a top-level subject instead of making an explicit parent of all subjects. I'm going to make room for designating letting names be logged-in or not. Neither should both be NULL. Can I set that in mysql as a condition?… This at least allows me for now to work for a while without a user logging system.

I know, it's no great shakes yet. I need to stuff the current set of comments into the blog and then recode this page properly. I need to create a simple blog object, which will be almost the same as the forum objects, so I may refactor them. And, remind me, I should make sure that the forum tables can link to blog entries, so I'll need to foreign key that in as well.

Then this page will simply make a call to the blog object to show, say, the most recent 5 entries for all
top-level subjects. After that i think I'll shift all forum comments to reside only on pages for specific blog entries.

Leave a comment