ok - Now just cleaning up a lot of possible issues, all the little edge case cleaning

master
root 10 years ago
parent 5bb6c62b97
commit 65615d08ab
  1. 1
      display.rb
  2. 3
      roller.rb

@ -34,3 +34,4 @@ result.num_rows.times do
puts result.fetch.join("\s") + "<br />"
end
print '</html>'
$my.close

@ -4,6 +4,7 @@ require "./die"
require "cgi"
cgi = CGI.new
result = roll(cgi.params["rollstring"][0].to_s)
statement = $my.prepare("INSERT INTO rolls set result='" + cgi.params["rollstring"][0] + "', roll='" + result.to_s + "', user='" + cgi.params["user"][0] + "', game='" + cgi.params["game"][0] + "'")
statement = $my.prepare("INSERT INTO rolls (id, roll, result, user, game) VALUES (" + $my.insert_id.to_s + ", '" + cgi.params["rollstring"][0] + "', '" + result.to_s + "', '" + cgi.params["user"][0] + "', '" + cgi.params["game"][0] + "');")
statement.execute
puts result
$my.close

Loading…
Cancel
Save