In the following, I want the first to ?be used literally, only the second ?should be used as a variable binding marker:
?
Foo.find_by_sql ["select IFNULL(col,'?') from foos where id = ?",1]
These errors are:
Incorrect number of binding variables (1 to 2)
How can I avoid the first ?one to be processed literally?
ActiveRecord , , , ? in '?' , . - :
'?'
Foo.find_by_sql ["select IFNULL(col, '?') from foos where id = :id", :id => 1]
ActiveRecord , ( Ruby), placeal ? placeholders. , .
Source: https://habr.com/ru/post/1660643/More articles:Unable to include Kotlin ad platform type warning in error message - intellij-ideaLibrary not loaded: @ rpath / libswiftCore.dylib - iosSpark Performance Improvements by Saving Sorted Parquet Files - sorting.NET Assembly loses some methods when importing from one Python file to another (IronPython) - ironpythonUIView removeFromSuperview calls didMoveToSuperview - iosCalling in AudioConverterFillComplexBuffer results in CrashIfClientProvidedBogusAudioBufferList only on MacOS Sierra - objective-cRuby: module expands from - ruby | fooobar.comUnexpected [path] in file loader - webpackHow to access parameters in ngrx effect in Angular 2? - angularRails Date # strptime parsing invalid until 200 - ruby | fooobar.comAll Articles