You might consider a custom finderQuery. There are examples of this on the group.

[EMAIL PROTECTED] wrote:
Hi,

I have moved the project to the production server and I got this
error:

---
SELECT `Post`.`id` , `Post`.`event_id` , `Post`.`visible` ,
`Post`.`time` , `Post`.`subject` , `Post`.`body` ,
`Post`.`published_in_forum`
FROM `posts` AS `Post`
JOIN `posts_tags` ON ( `posts_tags`.`tag_id` =10
AND `posts_tags`.`post_id` = `Post`.`id` )
WHERE 1 =1
LIMIT 0 , 30

Warning (512): SQL Error: 1064: You have an error in your SQL syntax
near 'ON (`posts_tags`.`tag_id`  =  10 AND `posts_tags`.`post_id` =
`Post`.`id`)  WHER' at line 1
---

I did not see this error on the development server. Production server
runs Mysql3 and development server runs mysql4. I know, I know, should
upgrade, but can't do that now.

Post HABTM Tags

The problem with the query is that it misses word LEFT just in front
of JOIN. If I change JOIN to LEFT JOIN it work perfectly. What's the
best way to fix this problem or should I just hack cake core?



  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to