public List <HistoryEntity> getDataByUserId(string str) { Debug.Log(Tag + "Getting User: "******"SELECT History.id, User.name, type, DATE(datetime), score FROM History JOIN User ON User.id = History.userId WHERE History.userId = '" + str + "'"; System.Data.IDataReader reader = dbcmd.ExecuteReader(); int fieldCount = reader.FieldCount; List <HistoryEntity> histories = new List <HistoryEntity>(); while (reader.Read()) { HistoryEntity history = new HistoryEntity(reader[0].ToString(), reader[1].ToString(), reader[2].ToString(), reader[3].ToString(), reader[4].ToString()); Debug.Log(" id: " + history._id); histories.Add(history); } return(histories); }
public void addData(HistoryEntity history) { IDbCommand dbcmd = getDbCommand(); dbcmd.CommandText = "INSERT INTO " + TABLE_NAME + " ( " + KEY_USERID + ", " + KEY_TYPE + ", " + KEY_SCORE + " ) " + "VALUES ( '" + history._userId + "', '" + history._type + "', '" + history._score + "' )"; dbcmd.ExecuteNonQuery(); }
public override void appendTableFromBottom(string table_name, HistoryEntity history) { IDbCommand dbcmd = getDbCommand(); dbcmd.CommandText = "INSERT INTO " + table_name + " ( " + KEY_ID + ", " + KEY_SIT + ", " + KEY_PLAYER + ", " + KEY_SPEAKER + ", " + KEY_CONTENT + " ) " + "VALUES ( '" + history._id + "', '" + history._sitID + "', '" + history._isPlayer + "', '" + history._Speaker + "', '" + history._Content + "' )"; dbcmd.ExecuteNonQuery(); }
public virtual void appendTableFromBottom(string table_name, HistoryEntity history) { Debug.Log(CodistanTag + "This function is not implemnted"); throw null; }