mysql UPDATE request not working and driving me crazy!!!


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database with an update command:

Code: $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:

Code: $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:

Code: $id = $_POST[skillsListDropDown]; //this is say 7
$id = ((int)$id);

Can anyone please help me.

Thanks

No comments posted yet

Your Answer:

Login to answer
199 Like 35 Dislike
Previous forums Next forums
Other forums

weird problem
last time, i did post a topic concerning why my page sometime will load as blank page when using IE.

Login Control?!
I have a Web Site that uses the login control also I have set the destinationurl to the page I want

Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrase

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

Problem in back link
I have page where i have given javascript back link but when i click on it browser give a message

Re-Order by ID Number
I have a cms set up for inputting an image, thumb, title, pdf, and eps. When input the database ass

Need PHP help... have all the elements... just need help putting them together :
Hey Guys,

I was wondering if someone could help me. I am doing a website for a client which

how to use two buttons with php
hi i have one form. there are three fields which are to be filled by the user. and then there are tw

The page should be expire when cilck back button
hi,
i'm new to php world.
i create user registration page.
when i submit it,data goes to my

Error querying database.
I get the above error when trying to insert some values to a datatable.
Here's the code :

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash