I have a posts/comments database that I am unable to order correctly.

I need it to be ordered primarily by its id but if its parent\_id does not equal its id, it is placed after its parent and also these children would ordered by id.

Here is my current database.

```
CREATE TABLE `questions` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `parent_id` int(10) NOT NULL,
  `entry_type` varchar(8) NOT NULL,
  `entry_content` varchar(1024) NOT NULL,
  `entry_poster_id` varchar(10) NOT NULL,
  `entry_status` varchar(1) NOT NULL,
  `entry_score` varchar(10) NOT NULL,
  `time_posted` varchar(10) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id` (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `questions`
--

INSERT INTO `questions` VALUES(1, 1, 'question', 'How do I does SQL?', 'CodyC', '0', '2', '1308641965');
INSERT INTO `questions` VALUES(2, 1, 'answer', 'Easy, you eat cheese!', 'PatrickS', '0', '-4', '1308641965');
INSERT INTO `questions` VALUES(3, 2, 'comment', 'WTF are you on noobass?!', 'FraserK', '0', '100', '1308641965');
INSERT INTO `questions` VALUES(4, 1, 'answer', 'blah', '5', '0', '0', '1308642204');
INSERT INTO `questions` VALUES(5, 4, 'comment', 'blah2', '4', '0', '0', '1308642247');
INSERT INTO `questions` VALUES(6, 2, '2', '3', '3', '3', '3', '3');

```

and my current query

```
SELECT *
FROM questions
WHERE parent_id =1
OR parent_id
IN (
    SELECT id
    FROM questions
    WHERE parent_id =1
    AND parent_id != id
)

```

how do I order so that order id to that each object comes after its parent, where the id = parent\_id means is a base level and has no parent?