我正在尝试制作一个搜索程序。我有三个表postivewords
:negativewords
和recommendationwords
。这些表仅由 word_id 和单词组成。我如何在查询中做到这一点?这就是我到目前为止所拥有的。如果我错了,请纠正我。
if(isset($_POST['searchword']))
{
$word = $_POST['search'];
$search1= mysql_fetch_array(mysql_query("SELECT * FROM positivethesaurus where word like '%$word%'"));
$search2= mysql_fetch_array(mysql_query("SELECT * FROM negativethesaurus where word like '%$word%'"));
$search3= mysql_fetch_array(mysql_query("SELECT * FROM recommendationthesaurus where word like '%$word%'"));
}