Mercurial > hgrepos > hgweb.cgi > skipweb
changeset 765:fc6152eb8941
prof squp test
author | ARAKI Tsuyohito <c113007@e.koeki-u.ac.jp> |
---|---|
date | Wed, 08 Jul 2015 20:10:56 +0900 |
parents | bf7d8db7b369 |
children | 99a86f0867af |
files | oasis2015/index.html oasis2015/prof.rb |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/oasis2015/index.html Wed Jul 08 20:07:13 2015 +0900 +++ b/oasis2015/index.html Wed Jul 08 20:10:56 2015 +0900 @@ -37,7 +37,7 @@ <option value="boy">男の子 <option value="girl">女の子 </select></td></tr> -<tr><td></td><td><input type="submit" value="送信"></td></tr> +<tr><td></td><td><input type="submit" value="登録する!"></td></tr> </table> <img src="account.png" width="幅" height="画像の高さ" alt=""> </form>
--- a/oasis2015/prof.rb Wed Jul 08 20:07:13 2015 +0900 +++ b/oasis2015/prof.rb Wed Jul 08 20:10:56 2015 +0900 @@ -9,7 +9,7 @@ id = c.cookies["id"][0] person = id.to_i -data = "select * from toi where id = ?" +data = "select * from test where id = ?" data2 = "select * from test where id = ?" #idが?(後で代入)のデータをtest票から探す。という命令をdataにしくむ。全てがほしい場合は「*」。「*」を「name」に変えると該当データのnameだけとりだす。 cook = db.execute(data, person) #dataに仕組んでいた命令を、personを代入しつつ実行。