lib/blazer/adapters/sql_adapter.rb in sql-jarvis-2.1.9 vs lib/blazer/adapters/sql_adapter.rb in sql-jarvis-2.1.10
- old
+ new
@@ -54,10 +54,10 @@
if postgresql?
"SELECT * FROM \"{table}\" LIMIT 30"
elsif sqlserver?
"SELECT TOP (30) * FROM {table}"
else
- "SELECT *\nFROM {table}\nORDER BY id DESC\nLIMIT 30"
+ "SELECT *\nFROM {table}\nORDER BY {table}.id DESC\nLIMIT 30"
end
end
def reconnect
connection_model.establish_connection(settings["url"])