Answer the question
In order to leave comments, you need to log in
How to split requests correctly or what is wrong?
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('a.virtuemart_product_id, a.product_name, a.product_desc, a.slug, p.product_price, c.virtuemart_category_id, cn.category_name, m.virtuemart_media_id, ms.file_url')
->from('#__virtuemart_products_ru_ru as a');
$query->join('LEFT', '#__virtuemart_product_prices AS p ON p.virtuemart_product_id = a.virtuemart_product_id');
$query->join('LEFT', '#__virtuemart_product_categories AS c ON c.virtuemart_product_id = a.virtuemart_product_id');
$query->join('LEFT', '#__virtuemart_categories_ru_ru AS cn ON cn.virtuemart_category_id = c.virtuemart_category_id');
$query->join('LEFT', '#__virtuemart_product_medias AS m ON m.virtuemart_product_id = a.virtuemart_product_id');
$query->join('LEFT', '#__virtuemart_medias AS ms ON ms.virtuemart_media_id = m.virtuemart_media_id');
$db->setQuery($query);
$data = $db->loadObjectList();
print_r($data);
Answer the question
In order to leave comments, you need to log in
Query the database natively in any database manager and see the error.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question