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 -

Save and close a word document by giving a name in R -

How can I utilize Yahoo Weather API in android -