Sequel::DatabaseError - PG::DatatypeMismatch: ERROR: argument of AND must be type boolean, not type integer

265 views Asked by At

I don't understand why this error:

Sequel::DatabaseError - PG::DatatypeMismatch: ERROR:  argument of AND must be type boolean, not type integer
LINE 1: SELECT * FROM "grupos" WHERE (("idGrupo" = 1) AND "idGrupo")...

My Sequel query is:

#@grupo = DB["SELECT * FROM grupos WHERE idGrupo = #{params[:num]}"]
@grupo = DB[:grupos].where(:idGrupo => params[:num].to_i)
0

There are 0 answers