postgresql - How to Compare two fields in laravel and postgres -


i'm trying query postgres db , sql error every time. query correct, why work?

query

apireq::where('calls','<','maxcalls')->get(); 

error

sqlstate[22p02]: invalid input syntax integer

field types both set bigint.

it's bizzare.

you need use whereraw instead of where. it's weird, gets around issue think laravel bug.

whereraw('calls < maxcalls')  

Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

scala - play framework: Modules were resolved with conflicting cross-version suffixes -