PHP mysql search multiple tables using a keyword
$query = “(SELECT content, title, ‘msg’ as type FROM messages WHERE content LIKE ‘%” . $keyword . “%’ OR title LIKE ‘%” . $keyword .”%’) UNION (SELECT content, title, ‘topic’ as type FROM topics WHERE content LIKE ‘%” . $keyword . “%’ OR title LIKE ‘%” . $keyword .”%’) UNION (SELECT content, title, ‘comment’ as … Read more