Commit 39f5ac0d authored by keyongyu's avatar keyongyu

fix bug

parent 647e7514
......@@ -379,7 +379,7 @@ public static string GetSelectSQL(Card c)
/// <param name="c">卡片数据</param>
/// <param name="ignore"></param>
/// <returns>SQL语句</returns>
public static string GetInsertSQL(Card c, bool ignore)
public static string GetInsertSQL(Card c, bool ignore,bool hex= false)
{
StringBuilder st = new StringBuilder();
if(ignore)
......@@ -389,14 +389,26 @@ public static string GetInsertSQL(Card c, bool ignore)
st.Append(c.id.ToString()); st.Append(",");
st.Append(c.ot.ToString()); st.Append(",");
st.Append(c.alias.ToString()); st.Append(",");
if(hex){
st.Append("0x"+c.setcode.ToString("x")); st.Append(",");
st.Append("0x"+c.type.ToString("x")); st.Append(",");
}else{
st.Append(c.setcode.ToString()); st.Append(",");
st.Append(c.type.ToString()); st.Append(",");
}
st.Append(c.atk.ToString()); ; st.Append(",");
st.Append(c.def.ToString()); st.Append(",");
if(hex){
st.Append("0x"+c.level.ToString("x")); st.Append(",");
st.Append("0x"+c.race.ToString("x")); st.Append(",");
st.Append("0x"+c.attribute.ToString("x")); st.Append(",");
st.Append("0x"+c.category.ToString("x")); st.Append(")");
}else{
st.Append(c.level.ToString()); st.Append(",");
st.Append(c.race.ToString()); st.Append(",");
st.Append(c.attribute.ToString()); st.Append(",");
st.Append(c.category.ToString()); st.Append(")");
}
if(ignore)
st.Append(";\nINSERT or ignore into texts values(");
else
......@@ -475,7 +487,7 @@ public static string GetDeleteSQL(Card c)
StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);
foreach (Card c in cards)
{
sw.WriteLine(GetInsertSQL(c, false));
sw.WriteLine(GetInsertSQL(c, false, true));
}
sw.Close();
}
......
......@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.4.0.7")]
[assembly: AssemblyVersion("2.4.0.8")]
★更新历史
2.4.0.8
修复
2.4.0.7
导出卡片为sql功能
2.4.0.5
......
[DataEditorX]2.4.0.7[DataEditorX]
[DataEditorX]2.4.0.8[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
No preview for this file type
★更新历史
2.4.0.8
修复
2.4.0.7
导出卡片为sql功能
2.4.0.5
......
# database history
F:\games\ygopro\cards.cdb
D:\code\a.cdb
D:\code\italian.cdb
# script history
\ No newline at end of file
[DataEditorX]2.4.0.7[DataEditorX]
[DataEditorX]2.4.0.8[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment