Vote count:
0
I just want to delete all rows of a table in order to "Reset" the table back to its original condition
$creditsbutton.click(
function(e)
{
db.transaction(studentinfotablereset);
}
);
function studentinfotablereset(tx)
{
var hardwareinfovariable =
"Model-"+device.model+"-Platform-"+device.platform+"-Version-"+device.version;
// This line is not deleting
tx.executeSql( "DELETE FROM STUDENTINFO", errorcode );
tx.executeSql(
"INSERT INTO STUDENTINFO
( name,
studentid,
deviceid,
totalnumber,
totalcorrect,
level,
teams,
streakrecord,
onegamerecord,
hardwareinfo,
userlanguage
)
VALUES (?,?,?,?,?,?,?,?,?,?,?)" ,
[
"RESETNAME",
"RESETID" ,
device.uuid,
0,
0,
1,
"DokoRESET",
0,
0,
hardwareinfovariable,
10
] , errorcode );
}
The INSERT INTO STUDENTINFO statement is running fine because that line is in another part of this program and
asked 35 secs ago
Why I cannot delete all rows in a table in SQLite under PhoneGap / Cordova
Aucun commentaire:
Enregistrer un commentaire