[eluser]lenwood[/eluser]
First, hearty thanks to all, I really appreciate the help.
[quote author="jedd" date="1272978124"]...it may be useful to know here how much data you anticipate pulling out in total with each pass. It's possible that it'd be more elegant to simply pull everything you need in a single query.[/quote]
This will be for a blog, I would anticipate that over time it will end up with hundreds of entries and thousands of comments. I think it would be rare that any single entry would receive hundreds of comments, though that's possible. This is all for a site that is just launching, so it'll likely be months before it gains the popularity to deal with that kind of volume though.
[quote author="jedd" date="1272978124"]An updated and annotated schema would be handy at this point.[/quote]
Here's what I have right now.
Code:
entries table
+----+-----------+------------+-----------+------+
| id | date_time | post_title | post_slug | body |
+----+-----------+------------+-----------+------+
comments table
+----+-----------+----------+------+--------+
| id | date_time | entry_id | body | author |
+----+-----------+----------+------+--------+
categories table
+----+------+
| id | name |
+----+------+
post_cat table
+----------+--------+
| entry_id | cat_id |
+----------+--------+
Over time I intend to add a few more things to these tables, but that's what I have right now.
Here's what I plan to add:
entries
-author
-published
comments
-URL
-approved