D
Derek Smith
db =
Amalgalite:atabase.new("/usr/local/vrep/repo/db/development.sqlite3")
table_exists = db.execute("select name from sqlite_master where
type='table' and tbl_name='derek'")
if defined?(table_exists)
p "yes"
end
exit
Why does this print "yes"? There is no table called derek in my DB. In
fact it prints yes no matter what I type in for tbl_name.
My goal is to see if a table exists by testing the var holding the data
is true/defined or not. Will you help?
thank you
derek!
Amalgalite:atabase.new("/usr/local/vrep/repo/db/development.sqlite3")
table_exists = db.execute("select name from sqlite_master where
type='table' and tbl_name='derek'")
if defined?(table_exists)
p "yes"
end
exit
Why does this print "yes"? There is no table called derek in my DB. In
fact it prints yes no matter what I type in for tbl_name.
My goal is to see if a table exists by testing the var holding the data
is true/defined or not. Will you help?
thank you
derek!