我正在为 cscart 开发 facebook 扩展,它使用 cron 将项目发布到 facebook。在我的本地开发环境: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);