Skip to main content
Bloco de codigo "executavel" só deve ser usado em caso de html/javascript/css.
Fonte Link

Fiz da seguinte maneira:

SELECT DISTINCT t1.product_id as product_idT1, t1.manufacturer_id as manufaturer, t1.price as price, t1.date_added as dataAdd, t1.quantity as quantity, t2.name as nameT2, t2.description as descriptionT2, t3.name as nameT3, t4.name as nameT4, t5.image as imagemT5, t6.name as nameT6, t7.query as urlT7, t7.keyword as keyword, t8.product_id, t8.price as produtoDesconto 
FROM oc_product t1 
LEFT JOIN oc_product_description t2 ON (t1.product_id = t2.product_id) 
LEFT JOIN oc_manufacturer t3 ON (t1.manufacturer_id = t3.manufacturer_id) 
LEFT JOIN oc_option_value_description t4 
LEFT JOIN oc_product_image t5 ON (t1.product_id = t5.product_id) 
LEFT JOIN oc_stock_status t6 ON (t1.stock_status_id = t6.stock_status_id) 
LEFT JOIN oc_product_special t8 ON (t1.product_id = t8.product_id)
LEFT JOIN oc_url_alias t7 
ORDER BY t5.product_id DESC

SELECT DISTINCT t1.product_id as product_idT1, t1.manufacturer_id as manufaturer, t1.price as price, t1.date_added as dataAdd, t1.quantity as quantity, t2.name as nameT2, t2.description as descriptionT2, t3.name as nameT3, t4.name as nameT4, t5.image as imagemT5, t6.name as nameT6, t7.query as urlT7, t7.keyword as keyword, t8.product_id, t8.price as produtoDesconto 
FROM oc_product t1 
LEFT JOIN oc_product_description t2 ON (t1.product_id = t2.product_id) 
LEFT JOIN oc_manufacturer t3 ON (t1.manufacturer_id = t3.manufacturer_id) 
LEFT JOIN oc_option_value_description t4 
LEFT JOIN oc_product_image t5 ON (t1.product_id = t5.product_id) 
LEFT JOIN oc_stock_status t6 ON (t1.stock_status_id = t6.stock_status_id) 
LEFT JOIN oc_product_special t8 ON (t1.product_id = t8.product_id)
LEFT JOIN oc_url_alias t7 
ORDER BY t5.product_id DESC

Me retorna o seguinte erro: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t5.product_id DESC LIMIT 0, 25' at line 10

pode me ajudar no que estou fazendo errado? Obrigado

Fiz da seguinte maneira:

SELECT DISTINCT t1.product_id as product_idT1, t1.manufacturer_id as manufaturer, t1.price as price, t1.date_added as dataAdd, t1.quantity as quantity, t2.name as nameT2, t2.description as descriptionT2, t3.name as nameT3, t4.name as nameT4, t5.image as imagemT5, t6.name as nameT6, t7.query as urlT7, t7.keyword as keyword, t8.product_id, t8.price as produtoDesconto 
FROM oc_product t1 
LEFT JOIN oc_product_description t2 ON (t1.product_id = t2.product_id) 
LEFT JOIN oc_manufacturer t3 ON (t1.manufacturer_id = t3.manufacturer_id) 
LEFT JOIN oc_option_value_description t4 
LEFT JOIN oc_product_image t5 ON (t1.product_id = t5.product_id) 
LEFT JOIN oc_stock_status t6 ON (t1.stock_status_id = t6.stock_status_id) 
LEFT JOIN oc_product_special t8 ON (t1.product_id = t8.product_id)
LEFT JOIN oc_url_alias t7 
ORDER BY t5.product_id DESC

Me retorna o seguinte erro: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t5.product_id DESC LIMIT 0, 25' at line 10

pode me ajudar no que estou fazendo errado? Obrigado

Fiz da seguinte maneira:

SELECT DISTINCT t1.product_id as product_idT1, t1.manufacturer_id as manufaturer, t1.price as price, t1.date_added as dataAdd, t1.quantity as quantity, t2.name as nameT2, t2.description as descriptionT2, t3.name as nameT3, t4.name as nameT4, t5.image as imagemT5, t6.name as nameT6, t7.query as urlT7, t7.keyword as keyword, t8.product_id, t8.price as produtoDesconto 
FROM oc_product t1 
LEFT JOIN oc_product_description t2 ON (t1.product_id = t2.product_id) 
LEFT JOIN oc_manufacturer t3 ON (t1.manufacturer_id = t3.manufacturer_id) 
LEFT JOIN oc_option_value_description t4 
LEFT JOIN oc_product_image t5 ON (t1.product_id = t5.product_id) 
LEFT JOIN oc_stock_status t6 ON (t1.stock_status_id = t6.stock_status_id) 
LEFT JOIN oc_product_special t8 ON (t1.product_id = t8.product_id)
LEFT JOIN oc_url_alias t7 
ORDER BY t5.product_id DESC

Me retorna o seguinte erro: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t5.product_id DESC LIMIT 0, 25' at line 10

pode me ajudar no que estou fazendo errado? Obrigado

Fonte Link

Fiz da seguinte maneira:

SELECT DISTINCT t1.product_id as product_idT1, t1.manufacturer_id as manufaturer, t1.price as price, t1.date_added as dataAdd, t1.quantity as quantity, t2.name as nameT2, t2.description as descriptionT2, t3.name as nameT3, t4.name as nameT4, t5.image as imagemT5, t6.name as nameT6, t7.query as urlT7, t7.keyword as keyword, t8.product_id, t8.price as produtoDesconto 
FROM oc_product t1 
LEFT JOIN oc_product_description t2 ON (t1.product_id = t2.product_id) 
LEFT JOIN oc_manufacturer t3 ON (t1.manufacturer_id = t3.manufacturer_id) 
LEFT JOIN oc_option_value_description t4 
LEFT JOIN oc_product_image t5 ON (t1.product_id = t5.product_id) 
LEFT JOIN oc_stock_status t6 ON (t1.stock_status_id = t6.stock_status_id) 
LEFT JOIN oc_product_special t8 ON (t1.product_id = t8.product_id)
LEFT JOIN oc_url_alias t7 
ORDER BY t5.product_id DESC

Me retorna o seguinte erro: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY t5.product_id DESC LIMIT 0, 25' at line 10

pode me ajudar no que estou fazendo errado? Obrigado