Re: Re: problems with different results on count() and select

From: Date: Thu, 16 Sep 2004 12:10:55 +0000
Subject: Re: Re: problems with different results on count() and select
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-196851@lists.php.net to get a copy of this message
On Thursday 16 September 2004 17:19, Merlin wrote: > the where clause is a replacement for the order by clause in the first > statement. Inside this first select statement I am showing 20 results on > each page with the limit command as shown here: > > SELECT > u.user_name, > FROM > usertable > ORDER BY > points desc, registration_date desc > Limit 20, 40 > > This should show the members ranked 20 - 40 > > On the other page I would just like to know which user rank this person > has: But it is never the same as on the other page > > SELECT count(*) AS c > FROM > usertable > WHERE > points > '$points' > AND registration_date > '$date' If you are sure your queries are correct then please take this off the php list. Ask on <YOUR DATABASE>'s mailing list. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* VMS is like a nightmare about RXS-11M. */

« previous php.general (#196851) next »