Remove commented code

This commit is contained in:
Matt Nadareski
2016-04-27 21:53:54 -07:00
parent a6536fd65e
commit ed193d1f1e

View File

@@ -455,26 +455,6 @@ namespace SabreTools.Helper
// If we're in merged mode, check before adding // If we're in merged mode, check before adding
if (merge) if (merge)
{ {
/*
string query = @"INSERT OR UPDATE INTO roms
(game, name, type, sysid, srcid, size, crc, md5, sha1, dupe)
VALUES ('" + tempname.Replace("'", "''") + "', '" +
xtr.GetAttribute("name").Replace("'", "''") + "', '" +
xtr.Name + "', " +
sysid + ", " +
srcid + ", " +
size +
(xtr.GetAttribute("crc") != null ? ", '" + xtr.GetAttribute("crc").ToLowerInvariant().Trim() + "'" : ", ''") +
(xtr.GetAttribute("md5") != null ? ", '" + xtr.GetAttribute("md5").ToLowerInvariant().Trim() + "'" : ", ''") +
(xtr.GetAttribute("sha1") != null ? ", '" + xtr.GetAttribute("sha1").ToLowerInvariant().Trim() + "'" : ", ''") +
", '" + filename + "'" +
")";
using (SqliteCommand slc = new SqliteCommand(query, dbc))
{
slc.ExecuteNonQuery();
}
*/
// If the rom doesn't exist, add it to the database // If the rom doesn't exist, add it to the database
string query = @"SELECT id FROM roms WHERE size=" + size + string query = @"SELECT id FROM roms WHERE size=" + size +
(xtr.GetAttribute("crc") != null ? " AND (crc='" + xtr.GetAttribute("crc").ToLowerInvariant().Trim() + "' OR crc='')" : "") + (xtr.GetAttribute("crc") != null ? " AND (crc='" + xtr.GetAttribute("crc").ToLowerInvariant().Trim() + "' OR crc='')" : "") +
@@ -526,7 +506,7 @@ VALUES ('" + tempname.Replace("'", "''") + "', '" +
else else
{ {
string query = @"INSERT INTO roms string query = @"INSERT INTO roms
(game, name, type, sysid, srcid, size, crc, md5, sha1) (game, name, type, sysid, srcid, size, crc, md5, sha1, filename)
VALUES ('" + tempname.Replace("'", "''") + "', '" + VALUES ('" + tempname.Replace("'", "''") + "', '" +
xtr.GetAttribute("name").Replace("'", "''") + "', '" + xtr.GetAttribute("name").Replace("'", "''") + "', '" +
xtr.Name + "', " + xtr.Name + "', " +
@@ -536,6 +516,7 @@ VALUES ('" + tempname.Replace("'", "''") + "', '" +
(xtr.GetAttribute("crc") != null ? ", '" + xtr.GetAttribute("crc").ToLowerInvariant().Trim() + "'" : ", ''") + (xtr.GetAttribute("crc") != null ? ", '" + xtr.GetAttribute("crc").ToLowerInvariant().Trim() + "'" : ", ''") +
(xtr.GetAttribute("md5") != null ? ", '" + xtr.GetAttribute("md5").ToLowerInvariant().Trim() + "'" : ", ''") + (xtr.GetAttribute("md5") != null ? ", '" + xtr.GetAttribute("md5").ToLowerInvariant().Trim() + "'" : ", ''") +
(xtr.GetAttribute("sha1") != null ? ", '" + xtr.GetAttribute("sha1").ToLowerInvariant().Trim() + "'" : ", ''") + (xtr.GetAttribute("sha1") != null ? ", '" + xtr.GetAttribute("sha1").ToLowerInvariant().Trim() + "'" : ", ''") +
", '" + filename + "'" +
")"; ")";
using (SqliteCommand sslc = new SqliteCommand(query, dbc)) using (SqliteCommand sslc = new SqliteCommand(query, dbc))
{ {