2 %% works perfectly.
For future stumblers of this post.
CLASSNAME.objects.raw("select * from table where full_name like'%%ipod%
%nano%%' ") works!!
Thanks mrfunyon.
ps: This should be added to the doc.
On Jun 6, 9:03 pm, mrfunyon wrote:
> Try using 2 %'s in your query
> like this:
> CLASSNAME.
Try using 2 %'s in your query
like this:
CLASSNAME.objects.raw("select * from table where full_name like
'%%ipod%%nano%%' ")
On Jun 6, 6:17 pm, Gyanit Singh wrote:
> Hi All,
>
> As start I know there is __contains [http://docs.djangoproject.com/en/
> dev/ref/models/querysets/#contains]. But it o
Hi All,
As start I know there is __contains [http://docs.djangoproject.com/en/
dev/ref/models/querysets/#contains]. But it only does LIKE '%word%'
query.
I want to do LIKE '%word1%word2%' query.
for e.g. select * from table where column LIKE '%ipod%nano%'.
The raw sql query is trying to replace
3 matches
Mail list logo