> If I express the last condition like: > > 'Post.datetime1' => '>Post.datetime2' > > I get anything > How can I do this?
Seriously man, "I get anything"? Not much to go on - try pasting the SQL that's being generated. Well, next time anyway. You just need to use the "just trust me on this" operator (I don't think it has a real name) array( 'Post.datetime1' => '-! > Post.datetime2' ) Which disables quoting and escaping and stuff. The resulting SQL should be: WHERE `Post.datetime1` > Post.datetime2 Notice how the LHS is quoted normally [your db might use different quotes than backticks], but the RHS one isn't? That's because you told cake to not mess with your RHS parameter in any way, using the operator. It's a hypen followed by an exclamation mark. Aside: Should that be called a "nega-bang" maybe? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
