it should have
Posted: Fri Jul 16, 2004 6:14 am
the points row is there, the username is there, users is the right name... is there anyother reason for this??
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$query = "SELECT `points` FROM `users` WHERE `username` = '$name'";
// to
echo $query = "SELECT `points` FROM `users` WHERE `username` = '$name'";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!
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());