/blog/index.php |
---|
14,7 → 14,7 |
write('<br />'); |
} |
$ids = $page->findIDs('BlogPosts'); |
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1'); |
for ($i = 0; $i < count($ids); $i++) |
{ |
$id = $ids[$i]; |
/install.sql |
---|
18,23 → 18,12 |
CREATE TABLE BlogPosts |
( |
ID INT NOT NUll AUTO_INCREMENT, |
ParentID INT, |
AuthorID INT, |
Title TEXT, |
Content TEXT, |
DatePosted DATETIME, |
Category TEXT, |
PRIMARY KEY(ID) |
); |
CREATE TABLE BlogComments |
( |
ID INT NOT NUll AUTO_INCREMENT, |
ParentID INT, |
AuthorID INT, |
PostID INT, |
Title TEXT, |
Content TEXT, |
DatePosted DATETIME, |
Spam BOOLEAN, |
PRIMARY KEY(ID) |
); |
/index.php |
---|
22,7 → 22,7 |
<?php |
$ids = $page->findIDs('BlogPosts'); |
$ids = $page->findIDs('BlogPosts', 'WHERE ParentID = -1'); |
for ($i = 0; $i < 5 && $i < count($ids); $i++) |
{ |
$id = $ids[$i]; |