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"; Link to comment https://forums.phpfreaks.com/topic/136991-is-my-table-updating-script-right/ 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. Link to comment https://forums.phpfreaks.com/topic/136991-is-my-table-updating-script-right/#findComment-715548 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 Link to comment https://forums.phpfreaks.com/topic/136991-is-my-table-updating-script-right/#findComment-715551 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 Link to comment https://forums.phpfreaks.com/topic/136991-is-my-table-updating-script-right/#findComment-715562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.