lib/kpm/database.rb in kpm-0.6.3 vs lib/kpm/database.rb in kpm-0.6.4
- old
+ new
@@ -54,10 +54,10 @@
@@mysql_command_line = "mysql #{@@database} --host=#{@@host} --port=#{@@port} --user=#{@@username} --password=#{@@password} "
end
def execute_insert_statement(table_name, query, qty_to_insert, table_data, record_id = nil)
- if not record_id.nil?
+ unless record_id.nil?
query = "set #{record_id[:variable]}=#{record_id[:value]}; #{query}"
end
query = "SET autocommit=0; #{query} COMMIT;"
File.open(STATEMENT_TMP_FILE,'w') do |s|
\ No newline at end of file