seamless_database_pool icon indicating copy to clipboard operation
seamless_database_pool copied to clipboard

Rails 5.0.1 placeholders are not working

Open lokanadhamm opened this issue 7 years ago • 3 comments

Role.first Role Load (3130.9ms) SELECT roles.* FROM roles ORDER BY roles.id ASC LIMIT ? ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1: SELECT roles.* FROM roles ORDER BY roles.id ASC LIMIT ?

lokanadhamm avatar Jul 13 '17 18:07 lokanadhamm

I also get this for all or most queries. It prevents the Rails app from starting.

caseyprovost avatar Oct 23 '17 13:10 caseyprovost

Try setting prepared_statements: false in database.yml

lokanadhamm avatar Oct 23 '17 13:10 lokanadhamm

This's helpful and should put to readme file.

aquadrehz avatar Feb 18 '21 09:02 aquadrehz