You are not logged in.
Pages: 1

I am trying to create a table name in a mysql database using ruby scripts. The name of the table should be the current date. this is how i tried to do it, but didnt work:
in the ruby code:
 TOS = Time.now.localtime.strftime("%Y-%m-%d_#{Time.now.hour}:#{Time.now.min}") 
 dbh = Mysql.real_connect("localhost", "testuser", "testpass", "test")
  dbh.query("CREATE TABLE #{TOS}
             (
               IP      VARCHAR(10),
               PORT    VARCHAR(5),
               SERVICE VARCHAR(40)
             )
           ")This doesnt work for some reason.. I started ruby yesterday so easy comments about my ignorance 
The ultimate Archlinux release name: "I am your father"
Offline
Pages: 1