06-27-2008, 10:31 PM
|
#1 (permalink)
|
|
The Visitor
Join Date: Jun 2008
Location: Zagreb, Croatia
Posts: 4
Thanks: 3
|
getting position
So, I have mysql table users:
ID name score
and when getting position of user 'abc', I use:
Code:
$q = select * from users order by score;
$o = mysql_query($q);
for($i=0;$r=@mysql_fetch_assoc($o);++$i)
if ($r["name"] == $username) return true;
my question is how can I optimize it, I might have thousands of users ...
|
|
|