Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 2345:0e17380df67c
updated
author | MURAKAMI Masaki <c112124@h.koeki-u.ac.jp> |
---|---|
date | Sat, 26 Jul 2014 10:44:30 +0900 |
parents | 0ec6003f38c9 |
children | 3bc043814871 |
files | minato2014/accountcheck.rb |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/minato2014/accountcheck.rb Sat Jul 26 10:41:58 2014 +0900 +++ b/minato2014/accountcheck.rb Sat Jul 26 10:44:30 2014 +0900 @@ -26,8 +26,12 @@ sex = c["sex"] aria = c["aria"] +begin sel = 'select * from main where id=? magic=?' -h = db.execute(sel, id.to_i, c_magic) +h = db.execute(sel, id.to_i, c_magic.to_i) +rescue +h == [] +end if id != nil && h != [] update = 'update main set name=?, job=?, age=?, sex=?, aria=? where id=? and magic=?'