I was trying to update an existing data and this error message came up. Does anyone know what this error message means?

Fatal error: Uncaught exception 'fSQLException' with message 'MSSQL error ([Microsoft][SQL Server Native Client 10.0][SQL Server]Violation of PRIMARY KEY constraint 'aaaaaPatient_PK'. Cannot insert duplicate key in object 'dbo.patient'. The duplicate key value is (a67).) in Update Patient Set patientname='aaaaa', address='aaaaa',gender='M',bloodtype='BM',spam='1',organs='1',patientid='a67'' in E:\Websites\INFOSYS280\flourish\fDatabase.php:428 Stack trace: #0 E:\Websites\INFOSYS280\flourish\fDatabase.php(2085): fDatabase->checkForError(false, NULL, 'Update Patient ...') #1 E:\Websites\INFOSYS280\flourish\fDatabase.php(2716): fDatabase->perform('Update Patient ...', Array) #2 E:\Websites\INFOSYS280\flourish\fDatabase.php(1451): fDatabase->run('Update Patient ...') #3 E:\Websites\INFOSYS280\f2013\project\mkwo026\patient.php(124): fDatabase->execute('Update Patient ...', 'aaaaa', 'aaaaa', 'M', 'BM', '1', '1', 'a67') #4 {main} thrown in E:\Websites\INFOSYS280\flourish\fDatabase.php on line 428

It looks like there already is a record with patientid = a67

I would expect patientid to be in your where statement (where patientid='a67') not in your update statement.