Thanks Malcolm! Would I make a variable like this?
FeedItems.objects.filter(feed_id='%s').order_by('feed_id')[:8] ??? I want this to loop through rows in my table with different values for %s...should I do this through my view or template? Thanks for the help! On Apr 29, 2:29 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-04-29 at 07:29 +0000, [EMAIL PROTECTED] wrote: > > Hi everyone, > > > Django/python newbie but I'm enjoying it so far! > > > Quick question: > > > How would I write this > > > SELECT * FROM aggregator_feeditems WHERE feed_id = 1 ORDER BY feed_id > > LIMIT 0,7 > > > in either a view or template where the feed_id value would be updated > > in a loop? > > Depends a lot on what the fields in your model are called. But, very > roughly, it will be something like > > FeedItems.objects.filter(feed_id=1).order_by('feed_id')[:8] > > Regards, > malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---