What needs to be added to the SQL query in order to search for information from 5 or more tables? Now I am looking for information only from the tableEpson table. But there are a few more: such as tableSamsung , tableKyocera , etc. It is necessary to look for them too. What to add and how? 
function search($words) { $words = strip_tags($words); if ($words === "") return false; $query_search = ""; $arraywords = explode(" ", $words); foreach ($arraywords as $key => $value) { if (isset($arraywords[$key - 1])) $query_search .= ' OR '; $query_search .= '`Model` LIKE "%'.$value.'%" OR `CartridgeNumber` LIKE "%'.$value.'%"'; } $query = "SELECT * FROM tableEpson, WHERE $query_search"; $mysqli = new mysqli ("localhost", "Имя пользователя", "Пороль", "Имя БД"); $result_set = $mysqli->query($query); $mysqli->close(); $i = 0; while ($row = $result_set->fetch_assoc()) { $results[$i] = $row; $i++; } return $results; } if (isset($_POST['bsearch'])) { $words = $_POST['words']; $results = search($words); print_r($results); }