Re: more than one querys LIKE in the same field

2010-12-14 Thread Gert Van Gool
django-developers is for the discussion of the development of Django
itself, not development with Django.
As such this mailing list is not appropriate for this message,
django-users would be more appropriate.

-- Gert

Mobile: +32 498725202
Twitter: @gvangool 
Web: http://gert.selentic.net



On Tue, Dec 14, 2010 at 09:14, marcoarreguin wrote:

> Hi friends!
>
> I mean do something like this:
>
> SELECT * FROM table WHERE tags LIKE '%candy%' AND  tags LIKE '%milk%'
>
>
>
> I've tried:
>
> table.objects.filter(tags__icontains='candy', tags__icontains='milk')
>
> I've tried too:
>
> list = ['candy', 'milk']
> table.objects.filter(tags__icontains=list
>
> And nothing work. Help me please :s
>
> Thanks bros!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To post to this group, send email to django-develop...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-developers+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-developers?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.



more than one querys LIKE in the same field

2010-12-14 Thread marcoarreguin
Hi friends!

I mean do something like this:

SELECT * FROM table WHERE tags LIKE '%candy%' AND  tags LIKE '%milk%'



I've tried:

table.objects.filter(tags__icontains='candy', tags__icontains='milk')

I've tried too:

list = ['candy', 'milk']
table.objects.filter(tags__icontains=list

And nothing work. Help me please :s

Thanks bros!

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.