Received: from redbox.venux.net (redbox.venux.net [216.47.238.10]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA33714 for ; Fri, 17 Dec 1999 22:55:43 -0500 (EST) (envelope-from mitch@venux.net) Received: from doot2 (dyn1-tnt1-133.kalamazoo.mi.ameritech.net [206.141.246.133]) by redbox.venux.net (Postfix) with SMTP id E72332E227 for ; Fri, 17 Dec 1999 22:50:05 -0500 (EST) Message-ID: <021101bf490b$d43b7ec0$0300000a@doot.org> From: "Mitch Vincent" To: Subject: count() question Date: Fri, 17 Dec 1999 22:56:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Hey guys, I'd like to thank Tom for his suggestion on the joins earlier. I more/less knew that about the joins but had built everything up and sort of stuck the sub-selects in there as a band-aid to fix a problem. I re-did all the queries using nothing but joins and boy, it's a lot faster. I have one problem though, this is a type of search engine so when I search I can't display all the results on one screen, it has to be limited. I use the LIMIT directive in the queries to do so. Before I had been going 2 queries, one to get the total number of results and one to just get 10 of those results. So my question is, is there anyway you can get the total number of results (using count() or something) and still use the limit directive in the same query? I tried looking at the number of result rows too but 10 (the limit) is all I come up with. I would really like to avoid doing 2 full queries here, if anyone has any suggestions please let me know. Thanks!! -Mitch