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

please help
HTML Code:

Code: <span id="ctl00"><span>

Printing issues with xMII 11.5
For some reason, we have one report (and only one) that is giving us fits when trying to print. The

FTP issues
Hi all,


I am currently facing some serious problems with a script and really need some ad

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

Using two $_POST Function / Switch () statements, second does not work.
Hi all. I’m new to php and am having a problem getting $_POST Function / switch () to work. I

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

How can i steam a video on my PHP site? (non YouTube)
Basically I have a PHP site and don't want to give page rank to YouTube. I just want to stream a bas

Parse Error with doctype
I'm getting a parse error with this simple code. I don't get it. It worked one time then when I relo

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