I'm trying to retrieve values from my table that are not null. Below is the picture of my table forumposts.

I want to retrieve all the thread titles that are not null. I'm using the following code :
$forum_activities = "";
$sql = "SELECT thread_title FROM forumposts WHERE thread_title IS NOT NULL";
$query = mysqli_query($db_conx, $sql);
$numrows = mysqli_num_rows($query);
if($numrows > 0)
{
while($row = mysqli_fetch_array($query,MYSQLI_ASSOC))
{
$thread_titles = $row["thread_title"];
$forum_activities .= "<a href='viewthread.php'>$thread_titles</a><hr />";
}
}
Null values are still coming. Please help!!
thread_title IS NOT NULL AND thread_title<>''