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

cURL and Sessions
Ohai.

So, I'm trying to cURL a bunch of things off of a page, and put them into a session. I'

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

PHP header help!
Hi all I am trying to get this php page to refresh every 5 seconds on my phone which is an aastra 48

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

Hyperlink in PHP to MySQL record
Hello,

I am having trouble as i am new to php. I have connected to the database and I have di

Saas with SAP R/3
hi experts,

Is SaaS offer available in SAP? for SAP R/3? from where i can get the info a

PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 200

Allegro crashes when running load_bitmap. Why?
I can not get Allegro to load any BMP images. Here is a section of test code. The picture is in the

Image resize
Hi again fellers

I managed to sort out the issues with the folder,

Final hurdle is th

DateTimeZone::listIdentifiers headache
http://php.net/manual/en/datetimezone.listidentifiers.php


So the documentation states tha

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