Hello, this error has been torturing me for an hour...
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 ''lock'='0' where pmID='206'' at line 1
This is the code:

else {                      
    print "Žinutė išsaugota.";
    $ui1="update km_pms set lock='0' where pmID='$x'";
    mysql_query($ui1) or die(mysql_error());            
  }

Can someone please tell me what I'm doing wrong?

Ok so it seems that mySQL interpreted table column lock as a command, because when I changed it into lockas everything seems to work fine. Problem solved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.