先安装ruby对mysql的支持库,geminstallmysqlrequire'rubygems'require'mysql'db=Mysql.connect('localhost','root','','book')db.query("insertintobookinfos(bookname,type)values('soft','2')");beginquery=db.query('select*frombookinfos')puts"Therewere#{query.num_rows...
查看全文