Are you sure it's not a typo in the condition: ->where('m.name like ?', '%' . $q . '%') - ->orWhere('l.name like ?', '%Swit%') + ->orWhere('m.name like ?', '%Swit%')
gabriel On Oct 27, 5:20 pm, erikms <erik.stok...@gmail.com> wrote: > Hi Florian, thank you for your prompt reply. I have DB logging on, I > think... > at any rate, I get the line in my log, telling me that > > SELECT [c].[country_id] AS [c__country_id], [c].[name] AS [c__name] > FROM [crm5].[country] [c] WHERE ([c].[name] like '%Afgh%' OR [c]. > [name] like ?) > > which is created from > $q = 'Afgh'; > $countries = Doctrine::getTable('MSCountries') > ->createQuery('m') > ->where('m.name like ?', '%' . $q . '%') > ->orWhere('l.name like ?', '%Swit%') > ->execute(); > is not valid SQL. Which it isn't. The last '?' is not being > substituted with the '%Swit%'. If I do that by hand and run the query, > I get the expected result: Afghanistan and Switzerland > Is that what you meant? and then, is this a symfony issue, a doctrine > one, or am *I* doing something wrong? > > Yours, > -Erik -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en