Thomas Seifert wrote:
On Thu, 16 Sep 2004 10:43:46 +0200, Merlin wrote:


Theoreticly the result number of the first select statement should be identical with the count statement, but it is not.

Has anybody an idea how to fix that?



It can't be the same number as you are using a where clause in the second
statement so you are missing some rows there.
also your code for ordering in the first part might just be wrong, but you
didn't show this code.


thomas

Hi,

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'


Any ideas?

Merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to