Just filtering Ques model (imho)
--
Rafael E. Ferrero
2014-05-07 10:24 GMT-03:00 Anushree :
> I have the following models. I want to retrieve list of question banks
> related to a particular subject. Is it possible to do without modifying the
> existing data
I have the following models. I want to retrieve list of question banks
related to a particular subject. Is it possible to do without modifying the
existing data models?Thank you
class Subject(models.Model):
name = models.CharField(max_length = 255)
desc = models.TextField(blank=True)
def
a value_list(). values_list usually returns a list of tuple, but if you
are only asking for a single field you can give it the flat flag, which
flattens the tuples into just the field value. (
https://docs.djangoproject.com/en/dev/ref/models/querysets/#values-list)
Taken all together, your query
Hi,
I have just started learning Django (been flip flopping between meteor and
django, cant decide which to use..) and I am fairly new to web development
in general.
Basically, I have a query where I am using the code "teecolor =
GolfCourseTees.objects.values('Tee_Color').filter(Course
Hi,
I have a Django project with its DB. How can I use Django DB users to
auth, for example, vsftpd? I mean, I couldn't find suitable SQL query to
check the password. Thank you!
signature.asc
Description: Digital signature
I've created a paginator for RawQuerySets.
https://github.com/seamusmb/django-paginator-rawqueryset
On Tuesday, March 26, 2013 5:51:41 AM UTC-4, chambe...@gmail.com wrote:
>
> I'm trying to implement Django's built in pagination feature with a raw
> query set. I've researched
Hello, I made this question with more details on stackoverflow:
https://stackoverflow.com/questions/22792828/best-subdocument-structure-to-query-django-tastypie-with-mongodb-backend
It could be summarized on this:
I want to create an structure with Django and Tastypie that allows to have
t; > model._default_manager.get(user__id__exact=self.id)
> > File "/usr/lib/python2.5/site-packages/django/db/models/manager.py",
> > line 93, in get
> > return self.get_query_set().get(*args, **kwargs)
> > File "/usr/lib/python2.5/site-packages/
2014-03-21 12:19 GMT-03:00 C. Kirby <mist...@gmail.com>:
> I've actually built a small app that generates a form allowing users to do
> a Meta Query on models django-modelqueryform.
> I am in the process of a full rewrite of it to make it a lot more
> customizable, but the ini
I've actually built a small app that generates a form allowing users to do
a Meta Query on models django-modelqueryform.
I am in the process of a full rewrite of it to make it a lot more
customizable, but the initial version works with fields that have choices
set or with fields
oad
> load it from my db.
>
> So far I'm thinking that using a form is they way to go to accept this
> information. But from there I'm a little confused. Does a custom model
> need to be created automatically before that query can be requested and
> displayed? Or can model be
there I'm a little confused. Does a custom model
need to be created automatically before that query can be requested and
displayed? Or can model be skipped in this case?
Thank you Django Community!
-Nicholas
--
You received this message because you are subscribed to the Google Groups
I am trying to convert sql query to django query but failed to do this, can
anyone help me
select id,name,round(value::numeric,2) as value, st_transform(geometry, 3857)
as geometry
from net_rest
where state_id in (1,2) and name = 'height'
union
(select d.id
On Fri, Mar 7, 2014 at 3:31 PM, bikeridercz wrote:
> Dear colleagues,
>
> I'm trying to do a direct select do database other than the default one. But
> it fails with error.
>
> Note 1: "ASSETS.objects.using('vodb').filter(...)" works fine
> Note 2: the select is little tricky and
Dear colleagues,
I'm trying to do a direct select do database other than the default one.
But it fails with error.
Note 1: "ASSETS.objects*.using('vodb')*.filter(...)" works fine
Note 2: the select is little tricky and unfortunately cannot be replaced by
a database view, because I have no
Hello, currently I have some Django sites one of them
is http://www.schnooge-hansili.de/ if i open it
with http://www.schnooge-hansili.de/?None It looks really ugly. Currently
the first site is just a simple CBV view. Nothing really special.
--
You received this message because you are
:
>
> On Wed, 5 Feb 2014 10:11:29 -0800 (PST) ST
> <sej...@googlemail.com>
>
> wrote:
> > Hi,
> >
> > I'm trying to optimize the run-time of getting total credit and debt
> > values out of our database. Ideally I'd like to formulate it as a
> > Dj
On Wed, 5 Feb 2014 10:11:29 -0800 (PST) ST <sej...@googlemail.com>
wrote:
> Hi,
>
> I'm trying to optimize the run-time of getting total credit and debt
> values out of our database. Ideally I'd like to formulate it as a
> Django query. This is the raw SQL query I have, which
On Wednesday, February 5, 2014 8:01:53 PM UTC, Anssi Kääriäinen wrote:
>
> Something like this might work:
>
> Transaction.objects.values_list('member_id').annotate(total=Sum('amount')).filter(total__gt=0).aggregate(Sum('total'))
>
This didn't work - it produced a "SELECT
Something like this might work:
Transaction.objects.values_list('member_id').annotate(total=Sum('amount')).filter(total__gt=0).aggregate(Sum('total'))
That is, don't start from Member, Django isn't smart enough to get rid of
the non-necessary joins. Instead go directly for the query you
Hi,
I'm trying to optimize the run-time of getting total credit and debt values
out of our database. Ideally I'd like to formulate it as a Django query.
This is the raw SQL query I have, which produces the right answer and is
very fast (milliseconds):
SELECT sum(tg.total) FROM
(
SELECT
ND, Friendship.FAVORITE]) That will give you a QuerySet of
>> all the friendships a user has. If you just want the list of friends then
>> extend that query with a values_list like so:
>>
>> Friendship.objects.filter(user__pk = 32, status__in = [Friendship.FRIEND,
>> Friendshi
ser has. If you just want the list of friends then
> extend that query with a values_list like so:
>
> Friendship.objects.filter(user__pk = 32, status__in = [Friendship.FRIEND,
> Friendship.FAVORITE]) .values_list('friend', flat=True)
>
>
>
> On Tuesday, December 17, 20
Why not just Friendship.objects.filter(user__pk = 32, status__in =
[Friendship.FRIEND, Friendship.FAVORITE]) That will give you a QuerySet of
all the friendships a user has. If you just want the list of friends then
extend that query with a values_list like so:
Friendship.objects.filter
I want to query the friends of an User but I'm struggling to get the
correct query.
Models:
class User(AbstractUser, TimestampedModel, SerializeMixin):
city = models.CharField(max_length=60, blank=True)
picture = models.URLField(blank=True)
cover_picture = models.URLField(blank
='members')
> member = models.ForeignKey(User)
> added_on = models.DateTimeField()
>
> The full query to get all Projects the User is either member or leader:
>
> Projects.objects.filter(
> Q(owner=user) | Q(members__member=user)
> )
>
> Don't merge in python what you
s.
>
>
> On Monday, December 16, 2013 1:47:13 PM UTC, Vibhu Rishi wrote:
>>
>> Hi
>>
>> I am not able to figure this out. I want to add objects to a query set.
>>
>> I have 2 models :
>> 1. Projects which is basically a list of projects. I have a field
Hi,
define related names in ProjectMember:
class ProjectMember(models.Model):
project = models.ForeignKey(Project, related_name='members')
member = models.ForeignKey(User)
added_on = models.DateTimeField()
The full query to get all Projects the User is either member or leader
gt; Hi
>
> I am not able to figure this out. I want to add objects to a query set.
>
> I have 2 models :
> 1. Projects which is basically a list of projects. I have a field which
> defines the owner of the project. e.g. :
>
> class Project(models.Model):
> ...
>
Rishi <vibhu.ri...@gmail.com>wrote:
>
>> Hi
>>
>> I am not able to figure this out. I want to add objects to a query set.
>>
>> I have 2 models :
>> 1. Projects which is basically a list of projects. I have a field which
>> defines the owner of the pro
in the 2nd table.
e.g. following is the full list of projects. + denotes that I am owner. *
denotes where I am a member.
Project1
Project2 ( + )
Project 3
Project4 ( * )
When I do a projects = Project.objects.filter(owner=request.user) I get a
query set like :
[]
Now, when I do member_projects
.ri...@gmail.com> wrote:
> Hi
>
> I am not able to figure this out. I want to add objects to a query set.
>
> I have 2 models :
> 1. Projects which is basically a list of projects. I have a field which
> defines the owner of the project. e.g. :
>
> class Project(mod
Hi
I am working on the same thing. Same here, one project model, one extended
User model. Well, when I printed the request, I got the Usename, which is
not an id, but you'd like to compare ids. Is that correct?
So perhaps you're closer to a solution, if you have a method like this:
def
Hi
I am not able to figure this out. I want to add objects to a query set.
I have 2 models :
1. Projects which is basically a list of projects. I have a field which
defines the owner of the project. e.g. :
class Project(models.Model):
...
owner = models.ForeignKey(User)
2
you need to specify that you want to join twice to that table. You
> do this by specifying the conditions for each join in a separate
> "filter()" call, and so to find threads that have a row with user1 in
> the through table, and also have user2 in the through table:
>
>
lter(user=user1).filter(user=user2)
You started by asking how to find threads which had user1 and user2,
but no other users. This is more complex, you need to count the number
of users in the thread without filtering the users first! This means
two queries, or a sub query:
threads_with_both = Thread.obje
How do I check whether there is a thread containing only the sender (user
1) and the recipient (user 2), and no other users.
models.py
class Thread(models.Model):
user = models.ManyToManyField(User)
is_hidden = models.ManyToManyField(User,
related_name='hidden_thread',
mid,realm__in=realms)
> data2 = AuctionData.objects.raw('SELECT * FROM auctiondata_auctiondata
> WHERE itemid_id=%s AND realm_id in %s ',[itemid,realms])
>
> The first query works as expected, but the 2nd one fails, because the
> query ends up as:
>
> SELECT * FROM auctiondata_auction
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 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
* FROM auctiondata_auctiondata
WHERE itemid_id=%s AND realm_id in %s ',[itemid,realms])
The first query works as expected, but the 2nd one fails, because the
query ends up as:
SELECT * FROM auctiondata_auctiondata WHERE itemid_id='43552' AND
realm_id in ('1',)
The last comma shouldnt
(alias, targets[0].column, None),
>> 'isnull', False), AND) < this is adding the spurious clause
>>
>> This is django version 1.6 and happens using both the original Q version
>> and using your suggested .exclude version.
>> Having found it I'm still
n
> and using your suggested .exclude version.
> Having found it I'm still not sure what it means or how to avoid it being
> triggered!
>
> Any suggestions?
>
I believe the query is actually correct. The idea is that
.exclude(condition) produces complement of .filter(condit
Please provide your models so I can reproduce it myself. It's quite
difficult (at least for me) to help otherwise.
On Thursday, November 14, 2013 7:17:43 AM UTC-5, Phoebe Bright wrote:
>
> After a long time trying to create a simple version that would replicate
> the error, and failing, I've
After a long time trying to create a simple version that would replicate
the error, and failing, I've tracked it through the original code.
Line 1140 in django/db/models/sql/query.py in function build_filter
if current_negated and (lookup_type != 'isnull' or value is False):
(user__in= rather than .filter(~Q if that works for
your query.
Tim
On Monday, November 11, 2013 6:36:12 AM UTC-5, Phoebe Bright wrote:
>
> I have this line in my code where the functions return an ID and what I
> wanted was to select all records that did not belong to one of th
I have this line in my code where the functions return an ID and what I
wanted was to select all records that did not belong to one of these users.
Carbon.objects.filter(~Q(user__in = [limbo_user(), system_user(),
retire_user()]))
What I expected to get was
*SELECT* •••
On Fri, Nov 8, 2013 at 1:44 AM, Robin St.Clair <robin...@live.co.uk> wrote:
> The last time I checked the use of IN, all the records from the database in
> the query were brought back to the workstation, rather than being processed
> on the backend and only the results returned to
:44:09 AM UTC+2, Robin St.Clair wrote:
> Anssi
>
> The last time I checked the use of IN, all the records from the database in
> the query were brought back to the workstation, rather than being processed
> on the backend and only the results returned to the workstation.
>
On Friday, November 8, 2013 8:44:09 AM UTC+2, Robin St.Clair wrote:
>
> Anssi
>
> The last time I checked the use of IN, all the records from the database
> in the query were brought back to the workstation, rather than being
> processed on the backend and only th
Anssi
The last time I checked the use of IN, all the records from the database
in the query were brought back to the workstation, rather than being
processed on the backend and only the results returned to the workstation.
Have there been changes that carry out the entire query
On Sunday, November 3, 2013 1:48:07 PM UTC+2, Robin St.Clair wrote:
>
> *IN*
>
>- if using Django avoid the IN operation at all costs
>
>
> If there are potentially more than 15 items in the list, rework the IN as
> a JOIN against whatever the source of the keys is
>
I don't necessarily
On Sat, Nov 2, 2013 at 4:50 PM, Daniele Procida wrote:
>
> But, the real killer is the combination of ordering (in the queryset or on
> the model, it doesn't matter) with the distinct() - as soon as one is removed
> from the equation, the execution time drops to around 250ms.
end coders didn't consider the DBMS to be importantDate: Sun,
3 Nov 2013 02:37:09 -0800
From: akaar...@gmail.com
To: django-users@googlegroups.com
Subject: Re: Complex query reduction
You should rewrite the query into a form that doesn't require distinct. In
general, when you see a query that has
You should rewrite the query into a form that doesn't require distinct. In
general, when you see a query that has joins and DISTINCT, that should be
an alarm bell that something isn't written correctly in the query.
Unfortunately Django's ORM generates such queries, and that isn't easy to
fix
).values_list('id', flat=True)
# and the set() here is about 230ms faster than putting a distinct() on
# the first query
researchers = set(Researcher.objects.filter(
person__entities__in=entities
).values_list('person', flat=True))
he total number of records shouldn't matter. more important is the
number of selected records at some points in the query. i'd guess the
number of chosen entities (those that _are_ descendant of the first
one), and the number of chosen researches (those that _are_ members of
those entities) should be the m
I have been exploring a rather complex query:
# get all the MPTT descendants of entity
entities = entity.get_descendants()
# get all the Researchers in these Entities
researchers = Researcher.objects.filter(person__member_of__entity__in=entities)
# get all the BibliographicRecords
uot;%s__name__contains" % field.name: search_term
})
if q:
if query:
query = query | q
else:
query = q
rows_list = rows_list.filter(query)
I would like to create a function that i can use
nique_together = [('user', 'friend')]
>
>
>
> The code I'm using to get the most recent friends of user 4
>
>
> id = 4
> friendships = Friendship.objects.exclude(status="pending").filter(
> ~Q(user__friendships__status="pending&
Ok, I think I got the point.
So, correct me if I didn't get it right, you have to get users which have
first_name, last_name, or other fields equal to the words in your list B.
This can be accomplished by looking at each field for each keyword. I would
also compile a dictionary keeping reference
On Fri, Oct 11, 2013 at 6:43 PM, Leonardo Giordani
wrote:
> Sorry, I forgot the User part of your question.
>
> Let me understand the exact relationship between codes, words and users: do
> those words or codes come from a form? Or are saved in the DB for each user?
1 Kamal Kaur <kamal.kaur...@gmail.com>
> On Fri, Oct 11, 2013 at 4:06 PM, Leonardo Giordani
> <giordani.leona...@gmail.com> wrote:
> > I think that you have to perform a query for each Code, extracting the
> list
> > of Word matching that Code and then merging all the lists
On Fri, Oct 11, 2013 at 4:06 PM, Leonardo Giordani
<giordani.leona...@gmail.com> wrote:
> I think that you have to perform a query for each Code, extracting the list
> of Word matching that Code and then merging all the lists.
Exactly!
> Since I don't know your models, I'll give y
I think that you have to perform a query for each Code, extracting the list
of Word matching that Code and then merging all the lists.
Since I don't know your models, I'll give you some general code, let me
know if you understand how to implement it exactly on your models.
Assuming
Hello there,
Hope you are doing well :)
I have a problem regarding querying a list from two tables, the
procedure goes like:
Considering two tables from mysql database:
1. UserProfile table, with complete client details: First name, Last
name, Address, email id, Contact number etc.
2.
Your right... I can't testing now.
2013/10/9 Hélio Miranda <helio...@gmail.com>
> gives error:
> 'BaseList' object has no attribute 'values'
>
> The query has to be the same as I stated it works:
> *
> Player.objects.filter(country__in=Country.object
gives error:
'BaseList' object has no attribute 'values'
The query has to be the same as I stated it works:
*
Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name='Espanhola')))
*
--
You received this message because you are subscribed
try this solution
http://plnkr.co/edit/cyM6AmZcyFVUU6soFKhB
2013/10/9 Denis Chernoshchekov
> ok, i understand, i minute.
>
>
> 2013/10/9 Denis Chernoshchekov
>
>> *fld_name = 'nationality_in' *must be with double '_'* **fld_name =
>>
ok, i understand, i minute.
2013/10/9 Denis Chernoshchekov
> *fld_name = 'nationality_in' *must be with double '_'* **fld_name =
> 'nationality__in'*
>
>
> 2013/10/9 Denis Chernoshchekov
>
>> Sorry, i don't understand you... You can
*fld_name = 'nationality_in' *must be with double '_'* **fld_name =
'nationality__in'*
2013/10/9 Denis Chernoshchekov
> Sorry, i don't understand you... You can control all your values for all
> fields, you can generate dict which you like.
>
>
> 2013/10/9 Hélio
Sorry, i don't understand you... You can control all your values for all
fields, you can generate dict which you like.
2013/10/9 Hélio Miranda
> I put that work, I wanted to know was how to put in the code, because you
> can not do the same to position
>
> --
> You received
was trying something like this:
*if fld_name == 'nationality':*
*fld_name = 'nationality_in'*
*value =
Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name=value)))
*
But it does not work
--
You
I put that work, I wanted to know was how to put in the code, because you
can not do the same to position
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Try this - *Player.objects.filter(country__in=**
Nationality.objects.filter(name='Espanhola').distinct('country').values('country'))
*
2013/10/9 Hélio Miranda
> yes, that was it ...
> Just one more thing, if I would like to create the nationality of the
> player, so that
yes, that was it ...
Just one more thing, if I would like to create the nationality of the
player, so that the filter is:
*
Player.objects.filter(country__in=Country.objects.filter(nationality__in=Nationality.objects.filter(name='Espanhola')))
*
*
*
where only the step nationality, as I do, not
See, maybe like this?
http://plnkr.co/edit/cyM6AmZcyFVUU6soFKhB
2013/10/9 Hélio Miranda
> I have code like this:
> http://plnkr.co/edit/L1ByIyFyaEdgwrfVU7Jr
>
> Just do not know how to put this part in the code ...
> Where do I put this part?
>
> --
> You received this
I have code like this:
http://plnkr.co/edit/L1ByIyFyaEdgwrfVU7Jr
Just do not know how to put this part in the code ...
Where do I put this part?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
For position you may have dict like - **{' position__in ':
Position.objects. filter(name=positionpost) }
9 жовт. 2013 11:45, користувач "Hélio Miranda" написав:
> hi, thanks that helped a lot.
> But I have a problem which is, for example when I do a filter by position,
> is
hi, thanks that helped a lot.
But I have a problem which is, for example when I do a filter by position,
is not direct as other fields like name or surname. For the position I have
to type this:
*
Player.objects.filter(position__in=Position.objects.filter(name=positionpost))
*
How can I
You can pass filter params like a dict -
Player.objects.filter(**your_dict), so you need only prepare your dict from
POST.
8 жовт. 2013 17:42, користувач "Hélio Miranda" написав:
> Hi
> Here I am having a problem which is as follows:
> I 'm getting parameters via post to make
I was testing you sent me, but it is giving me error ... is giving this
error: *expected string or buffer*
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
On Tue, Oct 8, 2013 at 11:42 AM, Hélio Miranda wrote:
>
> Hi
> Here I am having a problem which is as follows:
> I 'm getting parameters via post to make querys depending on paramtros I are
> passed ... doing gender filters.
> So I'm doing well
> def filter(request):
> if
.
I have created the model as shown in last post
but how to query individual details in their
respective profile is the problem.
Any way out. thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this grou
Hi
Here I am having a problem which is as follows:
I 'm getting parameters via post to make querys depending on paramtros I
are passed ... doing gender filters.
So I'm doing well
*def filter(request):*
*if request.method == 'POST':*
*namepost = request.POST.get('name')*
*
I managed to solve the problem, I did so:
*result = [a.get_json() for a in
Player.objects.filter(position__in=Position.objects.filter(name=positionpost))]
*
Thanks for the trouble
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
Gives error says:
DD is not a valid ObjectId
For the DD not objectId of reference
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
of The Digital Cat <http://lgiordani.github.com>
My profile on About.me <http://about.me/leonardo.giordani> - My GitHub
page<https://github.com/lgiordani>- My Coderwall
profile <https://coderwall.com/lgiordani>
2013/10/8 Hélio Miranda <helio...@gmail.com>
> Hi
> I w
Hi
I was trying to make a query in a field that has refencia to another
collection, like this:
*result = [a.get_json() for a in Player.objects.filter(position__name='DD')]
*
But it is returning me empty, and I have a player with the position DD
I'm using mongodb as a database.
In my Document
On Monday, 30 September 2013 19:33:31 UTC+1, Okorie Emmanuel wrote:
> I have two problems
>
> 1. How can i populate the account
>information of each user, this
>what i have done but only info on
>user models populates, the info on extended
>field does not show on my template
>
Please try, django-userena, or django-registration,
both deal with userdetails.
Thx
Frank
Am 30.09.13 20:33, schrieb Okorie Emmanuel:
I have two problems
1. How can i populate the account
information of each user, this
what i have done but only info on
user models populates, the
I have two problems
1. How can i populate the account
information of each user, this
what i have done but only info on
user models populates, the info on extended
field does not show on my template
# models.py
class Student(Models.model):
user = foreignkey(user)
Hi,
This is fixed, I think it was as I was missing one of the entries below:
37 MIDDLEWARE_CLASSES = (
38 # This loads the index definitions, so it has to come first
39 'autoload.middleware.AutoloadMiddleware',
40
41 'django.middleware.common.CommonMiddleware',
42
Hi,
I'm new to development and have just gone from some python and django tuts,
on my way to developing my first app.
I've created a model and can view it under the /admin page, however the
page does not use any of the pretty CSS you see in the tutorials because it
can't find the files:
I am trying a query like this:
result = json.dumps([a.get_json() for a in
Player.objects.filter((Q(name=namepost) | Q(surname="Coimbra")))])
return HttpResponse (result, content_type = 'application / json')
But it gives me the following error: Not a query object: (AND: ('surname',
ship.objects.exclude(status="pending").filter(
~Q(user__friendships__status="pending"),
user__friendships__friend_id=id).order_by("-created_at")
I also tried several combinations like grouping all filtering inside one
filter() but
ies if implemented naively. If I write the required
> query in raw SQL, it should be faster, but probably not very fast
> anyway. Also I don't know how to cache properly since topics should be
> ordered by most recent posts (that is, if someone posts to topic on
> third page, this top
Thanks for you replies.
But I wonder how real production web sites deal with this problem. The
problem is that I want to display about 30 topics per page which would
result in 30+1 queries if implemented naively. If I write the required
query in raw SQL, it should be faster, but probably
?
>
This is something that would be nice to support with prefetch_related().
This is exactly the type of query where ORM abstraction would be very
welcome. Writing this in SQL isn't easy, and the most efficient way to
write the query varies a lot depending on the used database backend.
Unfort
Problem is that you have to be able to express it in SQL. And thus ther is not
much you can do in SQL to get what you actually wanted.
Considering amount of the data fetched - it's relatively low query count and
unless you're hitting very busy site you wont notice much of difference doing
901 - 1000 of 2781 matches
Mail list logo