spenceddd Posted January 29, 2010 Share Posted January 29, 2010 Hi, I have been stuck on this for ages. Quite simply I am trying to update my database with an update command: $query="UPDATE `spence13_Portfolio`.`skillsList` SET `skillName` = '$newSkillName' WHERE `skillsList`.`ID` =$id"; This doesn't work even though if I change the line to read: $query="UPDATE `spence13_Portfolio`.`skillsList` SET `skillName` = '$newSkillName' WHERE `skillsList`.`ID` =7"; ..then it does work. The variable $id does equal a number and I even use this code to convert it to an integer just incase it's read as a string: $id = $_POST[skillsListDropDown]; //this is say 7 $id = ((int)$id); Can anyone please help me. Thanks Spencer Link to comment https://forums.phpfreaks.com/topic/190220-mysql-update-request-not-working-and-driving-me-crazy/ Share on other sites More sharing options...
spenceddd Posted January 29, 2010 Author Share Posted January 29, 2010 It's ok, it was my variable. Doh! Link to comment https://forums.phpfreaks.com/topic/190220-mysql-update-request-not-working-and-driving-me-crazy/#findComment-1003629 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.