Fixed Insert where
This commit is contained in:
parent
80af1c52ca
commit
a435966f07
1 changed files with 2 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ namespace TShockAPI.DB
|
||||||
{
|
{
|
||||||
sbwheres.Append(where.Name + "=" + where.Value.ToString());
|
sbwheres.Append(where.Name + "=" + where.Value.ToString());
|
||||||
if (count != wheres.Count - 1)
|
if (count != wheres.Count - 1)
|
||||||
sbvalues.Append(" AND ");
|
sbwheres.Append(" AND ");
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,7 +99,6 @@ namespace TShockAPI.DB
|
||||||
sbvalues.Append(", ");
|
sbvalues.Append(", ");
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return "INSERT INTO '{0}' ({1}) VALUES ({2})".SFormat(table, sbnames.ToString(), sbvalues.ToString());
|
return "INSERT INTO '{0}' ({1}) VALUES ({2})".SFormat(table, sbnames.ToString(), sbvalues.ToString());
|
||||||
}
|
}
|
||||||
public string ReadColumn(string table, List<SqlValue> wheres)
|
public string ReadColumn(string table, List<SqlValue> wheres)
|
||||||
|
|
@ -182,7 +181,7 @@ namespace TShockAPI.DB
|
||||||
{
|
{
|
||||||
sbwheres.Append(where.Name + "=" + where.Value.ToString());
|
sbwheres.Append(where.Name + "=" + where.Value.ToString());
|
||||||
if (count != wheres.Count - 1)
|
if (count != wheres.Count - 1)
|
||||||
sbvalues.Append(" AND ");
|
sbwheres.Append(" AND ");
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue