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

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

Populate drop down list from table??
Lets say for arguments sake that i have a table which contains the numbers 1 to 10.
How can i get

Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

Can you help please? Php file
I have to write this php file to allow users to register their nicknames on nickserv

For an I

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

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