Be seen. Boost your question’s priority for more expert views and faster solutions
$username = "bob";
$query = mysql_query("SELECT head.comment_id, friend_id, users.member_id, username, approved, UNIX_TIMESTAMP(date_posted) AS date_posted, comment_text, username FROM comments_head head FORCE INDEX(member_id), comments_body body, users WHERE head.comment_id = body.comment_id AND head.friend_id = users.member_id and body.comment_text LIKE '@$username%' order by head.comment_id desc limit " .$this->perpage) or die(mysql_error());
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
'@$username%'
... to this and let us know how it works out.
'@$username'
I'm not sure - you might need to prepend the @ to the $username variable before constructing the query. But this is where I would start to test.