SELECT id, title FROM blog WHERE MATCH (title, post) AGAINST ('mysql vsftpd')
UNION SELECT id,title FROM portfolio WHERE MATCH (title, content) AGAINST ('mysql vsftpd');
Can someone hint me in the way to know which row came from which table if i could specify in field list a column that will show me tables name that would be awesome I am looking for such solution.
got it, wasted post anyone who is interested,
<?php
$query = "SELECT 'blog' as 'table',id, title FROM blog WHERE MATCH (title, post) AGAINST ('{$string}')
UNION SELECT 'portfolio',id,title FROM portfolio WHERE MATCH (title, content) AGAINST ('{$string}')";
?>