Код: Выделить всё
SELECT (
SELECT image
FROM bc_item_image
WHERE item_id = i.id
LIMIT 1
) as item_image,
i.description,
i.condition,
c.cat_name as category_name,
i.id as ID
FROM bc_item i,bc_category c
WHERE i.cat_id = c.id
and i.user_id !='$user_id'
and i.status = '1'
and i.is_bartered = '0'
and i.is_cancel = '0'
and FIND_IN_SET('$subcat_id',i.interested_cat)
order by i.display_count desc
Подробнее здесь: https://stackoverflow.com/questions/493 ... t-table-jo
Мобильная версия