Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 2473:f9e448bfcd49
prof.rb id468 test
author | ARAKI Tsuyohito <c113007@e.koeki-u.ac.jp> |
---|---|
date | Wed, 08 Jul 2015 00:22:36 +0900 |
parents | 8f10d62ce4da |
children | 97d363f8dbcf |
files | oasis2015/prof.rb |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/oasis2015/prof.rb Wed Jul 08 00:16:36 2015 +0900 +++ b/oasis2015/prof.rb Wed Jul 08 00:22:36 2015 +0900 @@ -10,7 +10,7 @@ person = 468 #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 = ?"