Re: Query issues migrating from 4.1.22 to 5.0.67
In case anyone else encounters this problem, I figured that I'd post my solution. Evidently the order of JOIN precedence changed with mysql 5, so I reorded my query like so:
SELECT 1, `is_leaf`, `score`, `creation`, `objects`.`object_name`, `objects`.`object_id`, `types`.`type_name`, `objects`.`media_file`, `users`.`username`, `users`.`user_id`
FROM `users`, `types`, `object_scores`
RIGHT JOIN `objects` ON (`objects`.`type_id`>0
AND `objects`.`object_id`!='171197'
AND `objects`.`detached`=0
AND `objects`.`type_id`!=3 )
LEFT JOIN `object_map` ON (`object_map`.`parent_id`='171197'
AND `object_map`.`object_id` = `objects`.`object_id`)
WHERE `types`.`type_id` = `objects`.`type_id`
AND `object_scores`.`object_id`=`objects`.`object_id`
AND `users`.`user_id`=`objects`.`created_user_id`
AND `object_map`.`parent_id` IS NULL
AND MATCH (`object_name`, `object_body_nft`) AGAINST ('+longs' IN BOOLEAN MODE)
Works now!
Subject
Written By
Posted
Re: Query issues migrating from 4.1.22 to 5.0.67
June 18, 2009 09:38AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.