Jiraiya Posted December 15, 2008 Share Posted December 15, 2008 im not sure whats wrong with my updating script $username = $_COOKIE['ID_my_site']; $sql = mysql_query("SELECT * FROM users WHERE username = '$username'") or die(mysql_error()); if($r = mysql_fetch_assoc($sql)) { $skill = $r['skill']; if($skill >= 5000000) { //$rank = Akatsuki; //Unless Akatsuki is a constant, it should be in quotes. $rank = 'Akatsuki'; $query = "UPDATE users rank = '$rank=Akatsuki"; Quote Link to comment Share on other sites More sharing options...
kpetsche20 Posted December 15, 2008 Share Posted December 15, 2008 You are missing a where statement in your update query. Quote Link to comment Share on other sites More sharing options...
Jiraiya Posted December 15, 2008 Author Share Posted December 15, 2008 i added a were script put it still dosent work Quote Link to comment Share on other sites More sharing options...
mapleleaf Posted December 15, 2008 Share Posted December 15, 2008 $query = "UPDATE users SET rank = 'Akatsuki' WHERE id = 'whatever'"; Missing SET I think Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.