1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

added chat history stuff

This commit is contained in:
RaidMax
2017-11-02 17:20:10 -05:00
parent 9699f7c3f1
commit 308427e662
10 changed files with 219 additions and 2 deletions

View File

@ -22,7 +22,7 @@ namespace SharedLibrary
abstract public void Init();
protected bool Insert(String tableName, Dictionary<String, object> data)
protected bool Insert(String tableName, Dictionary<String, object> data, bool ignore = false)
{
string names = "";
string parameters = "";
@ -36,10 +36,12 @@ namespace SharedLibrary
var Con = GetNewConnection();
string ignoreCmd = ignore ? " OR IGNORE " : " ";
SQLiteCommand insertcmd = new SQLiteCommand()
{
Connection = Con,
CommandText = String.Format("INSERT INTO `{0}` ({1}) VALUES ({2});", tableName, names, parameters)
CommandText = String.Format("INSERT{0}INTO `{1}` ({2}) VALUES ({3});", ignoreCmd, tableName, names, parameters)
};
foreach (string key in data.Keys)
{