Skip to content

Commit

Permalink
fixed sql reader
Browse files Browse the repository at this point in the history
  • Loading branch information
mlomnicki committed Oct 12, 2009
1 parent 87584da commit 86eeba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/postpolicy/plugins/datasource/sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def exists?( value )
connection do |conn|
command = conn.create_command( @query )
reader = command.execute_reader
while reader.next
if reader.values[0] && item[0] == value
while reader.next!
if reader.values[0] && reader.values[0] == value
result = true
break
end
Expand Down

0 comments on commit 86eeba1

Please sign in to comment.