Okay, so I have a php form. It spits out all the values that I want from the database that I want for people to edit. However, the query that I'm using to get the data to update doesn't seem to be working.
I know that the new variables are being carried through to form the query, it's just not executing.
Here's the query:
$q="UPDATE ibf_character_registry SET (charID,date,pending,username,userID,firstname,lastname,speciesID,status,gender,preference,age,month,day,birthplace,occupation,physical,personality,history,tradenotes)
VALUES ('$charID','$date','$pending','$username','$userID','$firstname','$lastname','$speciesID','$status','$gender','$preference','$age','$month','$day','$birthplace','$occupation','$physical','$personality','$history','$tradenotes') WHERE userID = '$id' and charID = '$charID'";
$result= mysql_query($q, $connection) or die
("Could not execute query : $q." . mysql_error());
And the return error that I'm getting is this:
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(charID,date,pending,username,userID,firstname,lastname,species
I'm wondering if it's because I have the field 'charID' set as a Primary Key, or maybe I just keep on missing a typo. Whatever the case, I'd be grateful if someone could help me out. I've been trying to get this to work for the past hour and a half.