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 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -