Thursday, January 26, 2012

MySQL limit sub-query problem

All,

I have a query. Its working fine on sqlite server but not working fine
on mysql server.

This is the error message on mysql server: "This version of MySQL
doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery"

This is the query:

inner_q = obj_unassigned.values_list('pk', flat=True)[:diff]
total_objects = (obj_assigned | obj_class.objects.filter(pk__in=inner_q))

Any help appreciated on how to fix this.

Thanks.

RJ

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

No comments:

Post a Comment