Hello. There is a tovari table, it has an id_company column, this column contains the ID of the companies that sell this product, I write down the ID in this column with an array of 1, 3, 7, then I bring these companies to the page:
$directID = mysql_fetch_assoc(mysql_query("SELECT * FROM `company` WHERE `id` = '".intval($_GET["id"])."' LIMIT 1")); $company_bay_tov = explode(",", $directID['id_company']); $catalog_company = mysql_query("SELECT * FROM company WHERE id IN (" . implode(", ", $company_bay_tov) . ") LIMIT 6"); while ($cc_bay = mysql_fetch_assoc($catalog_company)) { //разметка } And now I need to display on the company’s page the products it sells. Company ID is defined by the variable $ directID ['id']
What should be the request in my case?