I am trying to set the date column to the current time stamp but for some reason I keep getting a syntax error.
$sql = "UPDATE testGraph
    SET date = CURRENT_TIMESTAMP
    SET State = ".$state1."
    WHERE Serial = ".$serial1."
   ";
I am trying to set the date column to the current time stamp but for some reason I keep getting a syntax error.
$sql = "UPDATE testGraph
    SET date = CURRENT_TIMESTAMP
    SET State = ".$state1."
    WHERE Serial = ".$serial1."
   ";
 
    
    Only one SET keyword is allowed in an UPDATE statement.
Replace the second SET keyword with a comma.
UPDATE mytable 
   SET mycol1  = expr1
     , mycol2  = expr2
--   ^
 WHERE ... 
 
    
    In a update query only one SET attribute is used Syntax
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
