Re: Making MODEL.objects.raw() query with LIKE input%

2010-11-10 Thread xvga
Daniel, thank you very much :) You are right, that was just an example query > user_input = "%s%%" % user_input did the trick. On Nov 10, 11:28 am, Daniel Roseman wrote: > On Nov 9, 10:06 pm, xvga wrote: > > > > > Hi All, > > >  my question is linked

Re: Making MODEL.objects.raw() query with LIKE input%

2010-11-10 Thread Daniel Roseman
On Nov 9, 10:06 pm, xvga wrote: > Hi All, > >  my question is linked to this thread, so I post here > > I need to run sql query with LIKE and % in the end - I have tried %% > and : > CLASSNAME.objects.raw("select * from table where full_name like %s%% > ", [user_input]) >

Making MODEL.objects.raw() query with LIKE input%

2010-11-09 Thread xvga
Hi All, my question is linked to this thread, so I post here I need to run sql query with LIKE and % in the end - I have tried %% and : CLASSNAME.objects.raw("select * from table where full_name like %s%% ", [user_input]) this is what I get as sql: select * from table where full_name LIKE