This is the code you need, although it would be better if you have the current message id and just have something like WHERE id != " . (int)$current_post_id . "
$title = mysql_real_escape_string($title); $sql = " SELECT * FROM posting WHERE title LIKE '%" . $title . "%' AND detail LIKE '%" . %title . "%' AND title != " . $title . " ";
Here is the ID version, better :)
$title = mysql_real_escape_string($title); $sql = " SELECT * FROM posting WHERE title LIKE '%" . $title . "%' AND detail LIKE '%" . %title . "%' AND id != " . (int)$post_id . " ";
source share