echo ("Поисковое слово - $find");
/* 1 - Поиск по таблице Infra_structura */
$result = mysql_query ("SELECT id, title FROM Infra_structura WHERE MATCH (text) AGAINST ('$find')",$db);
if (mysql_num_rows ($result) > 0)
{
$myrow = mysql_fetch_array ($result);
/* Цикл вывода */
do
{
printf ("<p class='view_name_cat'><a href='View_post.php?id=%s'>%s</a></p>", $myrow["id"], $myrow["title"]);
}
while ($myrow = mysql_fetch_array ($result));
}
else
{
/* Если результат =0 */
$null_rezult = 1;
}
/* 2 - Поиск по таблице History */
$result = mysql_query ("SELECT id, title FROM History WHERE MATCH (text) AGAINST ('$find')",$db);
if (mysql_num_rows ($result) > 0)
{
$myrow = mysql_fetch_array ($result);
/* Цикл вывода */
do
{
printf ("<p class='view_name_cat'><a href='View_history.php?id=%s'>%s</a></p>", $myrow["id"], $myrow["title"]);
}
while ($myrow = mysql_fetch_array ($result));
}
else
{
/* Если результат =0 */
$null_rezult = $null_rezult + 1;
}