Thanks, works fine. However, for further reference, the query should
be
Movies.query.filter(Movies.director.like('%ridley%'))
as the direct use of filter (without query) is marked deprecated.
On Jul 21, 5:17 pm, Erik Janssens <[EMAIL PROTECTED]> wrote:
> that should of course be :
>
> Movies.filter(Movies.director.like('%ridley%'))
>
> On Mon, 2008-07-21 at 07:20 -0700, sven-eric wrote:
> > Hey Folks,
>
> > I would like to know how I could query for a substring. Let's
> > suppose I have an Entity with a String field, e.i. some Movies in a
> > movie database with a director String field for each movie. Now I want
> > to select (or filter_by) all entries for which the String field
> > contains a specific substring, let's say "Ridley". How can I do that?
> > In the examples I found, String fields were only queried for equality,
> > and the API docs weren't very helpful in this regard. Thanks a lot for
> > your help!
>
> > Cheers, sven
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"SQLElixir" 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/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---