我正在为cscart开发facebook扩展程序,使用cron将项目发布到facebook。在我的本地dev env:wamp Apache 2.2.22 / PHP 5.3.13 / MySQL 5.6.14中,查询生成所需的输出,这是一行,但是当我在我的主机上测试相同的查询时,它会多次生成相同的行。我简直无法理解。 我的托管环境:MySQL 5.5.33-31.1 查询:
SELECT s.product_id
, category
, product
, short_description
, full_description
, pd.meta_keywords
, p.status
, p.approved
, il.image_id
, il.pair_id
, il.object_type
FROM cscart_social s
LEFT
JOIN cscart_products p
ON p.product_id = s.product_id
LEFT
JOIN cscart_product_descriptions pd
ON s.product_id = pd.product_id
LEFT
JOIN cscart_products_categories pc
ON s.product_id = pc.product_id
LEFT
JOIN cscart_category_descriptions cd
ON pc.category_id = cd.category_id
LEFT
JOIN cscart_images_links il
ON il.object_id = s.product_id
LEFT
JOIN cscart_images i
ON cscart_images.image_id = il.pair_id
WHERE 0 IN (fb_publish,tw_publish);
答案 0 :(得分:-1)
以下是两个解决方案: