changeset 1668:a0dc6355d633

kayaku.rb Êѹ¹6
author OOTANI Hiroyuki <c115036@g.koeki-u.ac.jp>
date Thu, 27 Jul 2017 00:41:05 +0900
parents 9c93cee11cdd
children 06e8b6dd2ef9
files event/oasis2017/ikusei/kayaku4.rb
diffstat 1 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/event/oasis2017/ikusei/kayaku4.rb	Thu Jul 27 00:22:50 2017 +0900
+++ b/event/oasis2017/ikusei/kayaku4.rb	Thu Jul 27 00:41:05 2017 +0900
@@ -57,11 +57,20 @@
   now = Time.now.strftime("%F %T")
   db.execute("REPLACE INTO users VALUES(?, ?, ?)", id, form_name, now);
 else				# フォームã§nameãªã‘ã‚Œã°dbã‹ã‚‰
-  dbname = db.execute("SELECT name from users WHERE id=?", id)[0][0]
-  if dbname != nil
-    playname = dbname		# データベースã‹ã‚‰ã®ã®åå‰ã‚’プレイåã¨ã™ã‚‹
+
+ # dbname = db.execute("SELECT name from users WHERE id=?", id)[0][0]
+  #if dbname != nil
+   # playname = dbname		# データベースã‹ã‚‰ã®ã®åå‰ã‚’プレイåã¨ã™ã‚‹
+  #end
+#end
+  
+  dbnane = db.execute("SELECT name from users WHERE id=?", id)[0]
+  if dbn != nil && dbn[0]
+    playname = dbn[0]
   end
-end
+
+
+
 if playname == ""
   print(<<-EOF)
 	<form action="#{File.basename($0)}" method="POST">

yatex.org