[SOLVED] Changing user pictures
Moderator: General Moderators
it should have
the points row is there, the username is there, users is the right name... is there anyother reason for this??
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
what does changing the lineoutput?
Code: Select all
$query = "SELECT `points` FROM `users` WHERE `username` = '$name'";
// to
echo $query = "SELECT `points` FROM `users` WHERE `username` = '$name'";it says
SELECT `points` FROM `users` WHERE `username` = ''
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 11 in /home/hackinou/public_html/members/mypage.php on line 8
houston, we have a problem!
thanks
hey
i noticed that it does update the ranks just to big boy and never updates when the user gets enough points to become the man, heres my code:
any ideas of why... thanks 
Code: Select all
// add points to users points row
$sql = "
UPDATE `users` SET `points` = `points` + '{$pts}',
`rank` = IF( `points` >= 20000, 'the man', `rank` ),
`rank` = IF( `points` >= 10000, 'big boy', `rank` ), <-- stops here
`rank` = IF( `points` >= 4000, 'baby', `rank` )
WHERE `username` = '{$uname}'";
@mysql_query($sql) or die(mysql_error());