Hi there,
I am having difficulties to order user into a ranking table. In the listing of the users I use a select statement, where I order after points and registration date. Then I print out thre results counting the rows. 1,2,3...
SELECT u.user_name, FROM usertable ORDER BY points desc, registration_date desc
on another page the user can access his user rank directly. Here I am using a count statement where I count all users who have more points than the member and have registered earlier (to avoid results with members having the same points)
SELECT count(*) AS c FROM usertable WHERE points > '$points' AND registration_date > '$date'
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?
Thanx in advance,
Merlin
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php