This is the situation, I have a simple table:
> DB.execute("CREATE TABLE IF NOT EXISTS webserver(id INTEGER PRIMARY
> KEY AUTOINCREMENT, url varchar(1000), server_name varchar(1000));")
I have just one record in the table:
SELECT * FROM webserver; 1 https://onlinetvs.inbulgaria.info/ cloudflare-nginx
When I am selecting the the server_name column I am getting nothing back: SELECT * FROM webserver WHERE server_name LIKE 'c%';
Before any update, I am checking the type as well, I know I am missing something small and stupid, but after my verification with the sqlite3 documentation, not sure which way to go.
hrefs.each do |link|
result = get_server_from_headers(link)
if result != nil && result.respond_to?(:to_str) && link.respond_to?(:to_str)
DB.execute("INSERT INTO webserver(url, server_name) VALUES(?, ?)", link, result)
puts "Adding to DB " + link + " " + result
abort
end
end