M
Mer Gilmartin
Here is my test code. I am wondering where I am going wrong.
I get no errors but the [temp] section in the db is still NULL.
@mytext = 'hi this is a test'
userentry = TkEntry.new(Frameone)
userentry.value = @mytext
ev = TkVirtualEvent.new('Button-1', 'Return')
userentry.bind(ev){@mytext = userentry.value; puts @mytext}
swopframebutton.bind('ButtonRelease-1'){@mytext = userentry.value; puts
@mytext}
begin
# connect to the MySQL server
dbh = Mysql.real_connect("localhost", "testuser", "testpass",
"test")
#res = dbh.query("INSERT INTO password (user, upassword, temp)
VALUES('check', 'check', #{@mytext})")
"INSERT INTO password (user, upassword, temp) VALUES('check',
'check', '#{@mytext}')"
I get no errors but the [temp] section in the db is still NULL.
@mytext = 'hi this is a test'
userentry = TkEntry.new(Frameone)
userentry.value = @mytext
ev = TkVirtualEvent.new('Button-1', 'Return')
userentry.bind(ev){@mytext = userentry.value; puts @mytext}
swopframebutton.bind('ButtonRelease-1'){@mytext = userentry.value; puts
@mytext}
begin
# connect to the MySQL server
dbh = Mysql.real_connect("localhost", "testuser", "testpass",
"test")
#res = dbh.query("INSERT INTO password (user, upassword, temp)
VALUES('check', 'check', #{@mytext})")
"INSERT INTO password (user, upassword, temp) VALUES('check',
'check', '#{@mytext}')"