Basic question - I might be going about this the wrong way but this is what I want to do.....
Instead of deleting a user record from the database completely I want to make it 'not-current'.
I have added a couple of extra field into the database to give me date/time information and a username.
I want to do a web based user interface to select a user from a list and say 'make this user not-current'.......
All is going OK until I get to the final part of process this INSERT...
what I want to say is
$query = "INSERT INTO tblUser (Removed,RemovedBy)
VALUES ('$now()','$username')
WHERE CName = $User AND ClientRef = $ClientId";
$result = mysql_query($query)
or die(mysql_error());
but I get the error message
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 'WHERE CName = george harrison AND ClientRef = 410' at line 3
what am I doing wrong - can I not use a WHERE clause in an Insert query ?
thanks