Re: Problem with raw query and using in

2013-11-19 Thread huw_at1
Hi, I think I had something similar and followed this thread: http://stackoverflow.com/questions/4574609/executing-select-where-in-using-mysqldb I think this is what Dennis has already said so apologies if it isn't helpful. Kindest regards On Saturday, 16 November 2013 12:40:52 UTC, Thorsten

Re: Problem with raw query and using in

2013-11-17 Thread Thorsten Sanders
Thanks, I tried that, it makes the query right, but when I access the result in a for loop it gives now: 'Cursor' object has no attribute '_last_executed' Think for now I just stay with using 2 variables, that works fine for the moment. Am 17.11.2013 00:38, schrieb Dennis Lee Bieber: On Sa

Re: Problem with raw query and using in

2013-11-16 Thread Thorsten Sanders
I am using mysql and when I write it like (1) then I get int is not iterable on the first one, but the raw works, if I do it like (1,) the first one works, but the raw one gets again the comma at the end, tried several ways always one of both not working, for me it looks kinda there is some mag

Re: Problem with raw query and using in

2013-11-16 Thread Javier Guerra Giraldez
On Sat, Nov 16, 2013 at 7:40 AM, Thorsten Sanders wrote: > realms=[1] > data = AuctionData.objects.filter(itemid__exact=itemid,realm__in=realms) > data2 = AuctionData.objects.raw('SELECT * FROM auctiondata_auctiondata WHERE > itemid_id=%s AND realm_id in %s ',[itemid,realms]) not sure if it's re

Problem with raw query and using in

2013-11-16 Thread Thorsten Sanders
Hello, wondering if I am doing something wrong or it is a bug, using django 1.5.5, but also tried with 1.6 resulting in the same problem. When I do the following: realms=[1] data = AuctionData.objects.filter(itemid__exact=itemid,realm__in=realms) data2 = AuctionData.objects.raw('SELECT * FROM