Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 2470:449a307dba58
prof.rb test goods
author | ARAKI Tsuyohito <c113007@e.koeki-u.ac.jp> |
---|---|
date | Wed, 08 Jul 2015 00:14:53 +0900 |
parents | f2b1efe180d2 |
children | b849598f0333 |
files | oasis2015/accountcheck.rb oasis2015/prof.rb |
diffstat | 2 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/oasis2015/accountcheck.rb Tue Jul 07 23:59:58 2015 +0900 +++ b/oasis2015/accountcheck.rb Wed Jul 08 00:14:53 2015 +0900 @@ -19,9 +19,6 @@ db.execute(cle3) db.execute(cle4) -id = c.cookies["id"][0] -person = id.to_i - name = c["name"] cal = c["cal"] age = c["age"]
--- a/oasis2015/prof.rb Tue Jul 07 23:59:58 2015 +0900 +++ b/oasis2015/prof.rb Wed Jul 08 00:14:53 2015 +0900 @@ -9,7 +9,7 @@ id = c.cookies["id"][0] person = id.to_i -data = "select * from test where id = ?" +data = "select * from goods where id = ?" #idが?(後で代入)のデータをtest票から探す。という命令をdataにしくむ。全てがほしい場合は「*」。「*」を「name」に変えると該当データのnameだけとりだす。 cook = db.execute(data, person) #dataに仕組んでいた命令を、personを代入しつつ実行。 jikan1 = "select * from time where cd = ?"