Jump to content

[SOLVED] Different versions, different results


php_fish

Recommended Posts

SELECT content.idcontent, content.title, content.main_body, media_files.file_name,media_files.media_type,media_assign.idmedia_assign,media_files.id_media_files

FROM (media_files LEFT JOIN media_assign  ON media_files.id_media_files = media_assign.id_media_files AND media_files.media_type = 0)

RIGHT JOIN

content

ON content.idcontent = media_assign.idcontent

GROUP BY content.idcontent

ORDER BY content.idcontent DESC;

Hi

 

Nothing obvious, but you appear to be doing a RIGHT JOIN against a field that, due to the LEFT JOIN, might not be populated. The left join seems irrelevant.

 

All the best

 

Keith

 

I reversed the LEFT to a RIGHT join and it works fine on both platforms. Thanks for pointing me in the right direction. Still doesn't explain the different results earlier but hey I'm a happy chappy now :) woooooo weeeee

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.