For help, the problem is displayed after multi-table fuzzy search! & Lt ;? Php $ title = htmlspecialchars ($ _ POST [& quot; title & quot;]); $ result = mysql_query (& quot; select * frompro_transwheretitlelik for help, problem displayed after multi-table fuzzy search!
$ Title = htmlspecialchars ($ _ POST ["title"]);
$ Result = mysql_query ("select * from pro_trans where title like '% $ title %' union select * from pro_transprotection where title like '% $ title %' union select * from pro_reactor where title like '% $ title % '");
While ($ row = $ db-> getarray ($ result )){
Echo"
";Echo"
";Echo"
| ";Echo"
". $ Row ['title']." | ";Echo"
";Echo"
";Echo"
";
}
?>
Q: How do I write about the red place?
After multi-table query, the results are linked. click the link to go to the corresponding page.
------ Solution --------------------
$ Result = mysql_query ("select *, 'Pro _ trans 'as tbl_name from pro_trans where title like' % $ title % 'Union select *, 'Pro _ transprotection 'as tbl_name from pro_transprotection where title like' % $ title % 'union select * from pro_reactor where title like' % $ title % '");
Echo"$ Row [title]";