changeset 606:8d9231f5cc97

updated
author MURAKAMI Masaki <c112124@h.koeki-u.ac.jp>
date Sat, 26 Jul 2014 10:08:51 +0900
parents e319e99441af
children c4ca02958a58
files minato2014/accountcheck.rb
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/minato2014/accountcheck.rb	Sat Jul 26 10:03:52 2014 +0900
+++ b/minato2014/accountcheck.rb	Sat Jul 26 10:08:51 2014 +0900
@@ -26,7 +26,10 @@
 sex  = c["sex"]
 aria = c["aria"]
 
-if id != nil && c_magic != nil
+sel = 'select * from main where id=?'
+h = db.execute(sel, id)
+
+if id != nil h != []
 update = 'update main set name=?, job=?, age=?, sex=?, aria=? where id=? and magic=?'
 mg = c_magic
 db.execute(update, name, job, age, sex, aria, id.to_i, mg.to_i)

yatex.org