I'm creating a login form and has functions of edit, delete and saving the data. The problem is in the edit or update part, when i'm about to edit for example a username, then i clicked the button edit the edited version is being saved as well as the data that is to be edited. So when i edit a data there is a duplication.
This is my code for the edit part. I'm using flash cs6 and sqlite.
function update(MouseEvent):void
{
var stat:SQLStatement = new SQLStatement();
stat.sqlConnection = connection;
stat.text = "UPDATE player SET fname=@fname,
dateplayed=@dateplayed, timein=@timein
WHERE fname=" + itemList.selectedItem.data.idd;
stat.parameters["@fname"] = fname.text;
stat.parameters["@dateplayed"] = dateplayed.text;
stat.parameters["@timein"] = timein.text;
stat.execute(-1, new Responder(selectItems));
fname.text = "";
dateplayed.text = "";
timein.text = "";
}
Hope you could help me, i'm just a newbie in flash. Thanks in advance