$row = $stmt->fetch(PDO::FETCH_ASSOC); is a string that will cause your error.
Why?
Because nothing happens - in the array - after the update
remember, that
PDO :: FETCH_ASSOC: returns an array indexed by column name as returned in your result set
So, there is no result ... no party
If you want to know the exit status of your command, just use the return value of execute() function
$rv = $stmt->execute(array('USERNAME' => $USERNAME));
Doncallisto
source share