I'm assuming that you don't want any 'User' added on the query?
-----Original Message----- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Kynlem Sent: 25 Desember 2006 5:24 To: Cake PHP Subject: findBy issue Hello, I've been having some problems with a findBy<field> function. When I've called the method with a not empty string as argument, it worked fine, but when I've passed an empty string, Cake generated the query with the WHERE clause like: WHERE (`User`.`username` = ) I've spent a bit of time searching for the problem cause in Cake sources (a great benefit of open source software, you can explore it yourself), and came up changing dbo_source.php line #1380 from: if ($match['2'] != '' && !is_numeric($match['2'])) { to: if (!is_numeric($match['2'])) What solved the problem. Have anyone had a similar problem before? I have commented all relations inside my model declaration. I'm running PHP 5.2.0, MySQL 5.0.27 and CakePHP 1.1.11.4064. ---------------------------------- Olexandr Melnyk, http://omelnyk.net/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---