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

Save username into DB
OkaY so I got my blog to actually save the posts and whatever, all I need now is for it to keep the

losing session vars when arriving from an email link
Hi,

I've got a confirmation script made that sends an email with a link for a user to confirm

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

controlling/creating accounts with privileges
hi all,
i'm trying to figure out how i can create/control account with privileges, for instance a

How to restrict the display of report variants
Hello All,

I want t know how to restrict the display of report variants.
I mean, whe

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

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

Embed Video Problem
Hey, thanks for looking!

File to be embedded:

Code: <playlist version="1&q

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