Hi All, I am starting to use cake 1.2 for a project. I want to do things in the "cake" way and on the simple tests db I wanted to retrieve the street name by soundex as well as checking the soundex of the reverse string.
My query look like this : // this is needed to reverse the utf-8 string (I am dealing with greek right now) $z = $this->data['Work']['street']; preg_match_all('/./us', $z, $ar); $x = join('',array_reverse($ar[0])); $this->data = $this->Test->findAll(array('SOUNDEX( Test.street )' => "-!SOUNDEX('{$this->data['Work']['street']}')", 'SOUNDEX( REVERSE( Test.street) )' => "-!SOUNDEX('{$x}')")); It seems there is a problem into the formatting of the query, because of the 2 functions "SOUNDEX( REVERSE( ". The formatted query gives this : Query: SELECT `Test`.`id`, `Test`.`street`, `Test`.`rstreet` FROM `tests` AS `Test` WHERE SOUNDEX(` Test`.`street `) = SOUNDEX('ΓΕΩΡΓΙΟΥ') AND SOUNDEX( REVERSE(` Test`.`street) `) = SOUNDEX('ΥΟΙΓΡΩΕΓ') There is a slight problem around the content of REVERSE, a quote is dropped after the parentheses and missing before. I solved my problem by wiriting the query string itself, but this problem occurs every time you combine SQL functions. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---