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
Post a Comment