#! /usr/bin/ruby # # maria_delete.rb # # Feb/23/2023 # require 'mysql2' # # ------------------------------------------------------------ def delete_proc (client,id) sql_str="DELETE from cities where ID = '#{id}'" client.query(sql_str) end # ------------------------------------------------------------ STDERR.puts "*** 開始 ***" # id_in = ARGV[0] # puts id_in # host = "127.0.0.1" user = "scott" password = "tiger123" data_base = 'city' client = Mysql2::Client.new(host: host, username: user, password: password, database: data_base) # delete_proc(client,id_in) # client.close # STDERR.puts "*** 終了 ***" # ------------------------------------------------------------