thefollower Posted October 30, 2007 Share Posted October 30, 2007 I have this update which doesn't seem to update my table but also produces no error either =/ This is what i got : $Date = date("Y-m-d H:i:s",time()); $NewTotal = 100; $UpdateMyTravel = "UPDATE countryusercoords SET HitchHike=HitchHike+$NewTotal AND StartedHitchHike='$Date' WHERE UserID= '{$_SESSION['Current_User']}'"; $travelresult = mysql_query($UpdateMyTravel) or die(mysql_error()); what did i do wrong? Quote Link to comment https://forums.phpfreaks.com/topic/75398-solved-why-doesnt-my-update-work/ Share on other sites More sharing options...
toplay Posted October 30, 2007 Share Posted October 30, 2007 The "AND" doesn't belong there. I think you meant to have a comma. See update syntax: http://dev.mysql.com/doc/refman/5.0/en/update.html Moving post to MySQL help area. Quote Link to comment https://forums.phpfreaks.com/topic/75398-solved-why-doesnt-my-update-work/#findComment-381408 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.