Hi
Bellow script.,
when i run the script. it does not show any output .
#!/usr/bin/ruby
require ‘cgi’
require ‘mysql’
cgi = CGI.new
m = Mysql.new(“localhost”,“root”,"",“fosiul”)
r = m.query(“SELECT * FROM dc”)
puts cgi.header
puts "
<select>
r.each_hash do |f|
<option> #{f['dc']}</option>
end
</select>
</body></html>"
where i am doing wrong ???
Please let me know
Thanks