remove duration attribut
This commit is contained in:
parent
49060a8419
commit
713b8aae5e
|
@ -12,7 +12,7 @@ int initializeTrailsTable()
|
|||
// char *sql = "CREATE TABLE Test(Id INT)";
|
||||
|
||||
char *sql =
|
||||
"CREATE TABLE Trials(Id INTEGER PRIMARY KEY AUTOINCREMENT, Position TEXT, Start INT, Frequency NUMBER, Duration INT);";
|
||||
"CREATE TABLE Trials(Id INTEGER PRIMARY KEY AUTOINCREMENT, Position TEXT, Start INT, Frequency NUMBER);";
|
||||
|
||||
rc = sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
||||
rc = sqlite3_step(stmt);
|
||||
|
@ -115,7 +115,7 @@ char *convertIntegerToChar(int N)
|
|||
return (char *)arr;
|
||||
}
|
||||
|
||||
int insertTrailElement(char *position, int start, double frequency, int duration)
|
||||
int insertTrailElement(char *position, int start, double frequency)
|
||||
{
|
||||
|
||||
sqlite3 *db;
|
||||
|
@ -127,7 +127,7 @@ int insertTrailElement(char *position, int start, double frequency, int duration
|
|||
|
||||
rc = sqlite3_open("robotgowest.db", &db);
|
||||
|
||||
rc = sqlite3_prepare_v2(db, "INSERT INTO Trials(Position,Start,Frequency,Duration) VALUES ( :position , :start , :frequency , :duration )", -1, &stmt, NULL);
|
||||
rc = sqlite3_prepare_v2(db, "INSERT INTO Trials(Position,Start,Frequency) VALUES ( :position , :start , :frequency )", -1, &stmt, NULL);
|
||||
if (rc != SQLITE_OK)
|
||||
return 1;
|
||||
|
||||
|
@ -137,8 +137,6 @@ int insertTrailElement(char *position, int start, double frequency, int duration
|
|||
|
||||
sqlite3_bind_double(stmt, 3, frequency);
|
||||
|
||||
sqlite3_bind_int(stmt, 4, duration);
|
||||
|
||||
rc = sqlite3_step(stmt);
|
||||
rc = sqlite3_finalize(stmt);
|
||||
sqlite3_close(db);
|
||||
|
|
Loading…
Reference in a new issue