Lav din thread_title
er
varchar(255) and Default value is NULL
og brug din forespørgsel
CREATE TABLE IF NOT EXISTS `forumposts` (
`thread_title` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `forumposts` (`thread_title`) VALUES
('foo'),
('bar'),
(NULL);
SELECT thread_title FROM forumposts WHERE thread_title IS NOT NULL
OUTPUT
THREAD_TITLE
foo
bar
HER ER DEN FUNGERENDE SQL-FIDDLE