There is a request:

SELECT shop_items.id FROM shop_items LEFT JOIN shop_items_rows_values as row10 on row10.id_row='10' and row10.id_item=shop_items.id where (row10.value = '19' or row10.value = '24') and archive = '0' 

The result gives shop_items with row10.value and 20 and 16 ...

Tables:

 CREATE TABLE IF NOT EXISTS `shop_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `division` int(11) NOT NULL, `divisions` varchar(255) NOT NULL, `art` varchar(255) NOT NULL, `name` varchar(255) NOT NULL, `images` int(11) NOT NULL, `url` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 

and

 CREATE TABLE IF NOT EXISTS `shop_items_rows_values` ( `id` int(11) NOT NULL AUTO_INCREMENT, `id_row` int(11) NOT NULL, `id_item` int(11) NOT NULL, `value` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 

    1 answer 1

    LEFT JOIN selects all rows from the left table. And to them - the corresponding rows from the right table, or null, if there are no such rows.

    Those. Your code selects all lines from shop_items. Even those that have no matches in the right table.

    If you need only shop_items c row10.value 19 and 24 - change to INNER JOIN.